Skip to contentSkip to conversation

All interface specifications being replaced by ANYWHERE

DISCUSSION Grant Adamson 3 participants 3 messages Dec 9, 2005 – Dec 12, 2005

lore
Share & tools
lore
#0 lore raw

Hi All,

I recently redid my home gateway/NAT box with debian 3.1, and everything looked to be working fine until I did a quick scan on it from outside to test the firewall. All the services running appeared to be exposed. Checking my rules with iptables -L, I found that for some reason, everywhere I had specified a physical interface, it had been replaced by ANYWHERE.

For example, the following rule:

iptables -A INPUT -m state --state NEW -i ! $EXTIF -j ACCEPT

Ends up appearing in the iptables -L list as:

target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state NEW

Needless to say, this doesn't make for a very good situation. Has anyone ever seen a problem like this before? Any suggestions would be greatly appreciated.

Thanks,
Grant

#1 lore raw
Quoted 3 lines

For example, the following rule:

iptables -A INPUT -m state --state NEW -i ! $EXTIF -j ACCEPT

What is the value of EXTIF?

Quoted 4 lines

Ends up appearing in the iptables -L list as:

target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state NEW

I think you did not "-d" option. It may mean anywhere. iptables -A INPUT -d $ALLOWIP -m state --state NEW -i ! $EXTIF -j ACCEPT ok?

#2 lore raw
In reply to Grant Adamson

Grant Adamson escreveu:

Quoted 8 lines

Hi All,

I recently redid my home gateway/NAT box with debian 3.1, and everything looked to be working fine until I did a quick scan on it from outside to test the firewall. All the services running appeared to be exposed. Checking my rules with iptables -L, I found that for some reason, everywhere I had specified a physical interface, it had been replaced by ANYWHERE.

Quoted 11 lines

For example, the following rule:

iptables -A INPUT -m state --state NEW -i ! $EXTIF -j ACCEPT

Ends up appearing in the iptables -L list as:

target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state NEW

To see interfaces, you should use -v option on iptables. Interfaces
do not show when you use -L alone.

I always use iptables -nL TABLENAME -v (TABLENAME is optional).

Please check your rules with: iptables -nL INPUT -v

Signature · 8 lines
	Atenciosamente / Sincerily,
	Leonardo Rodrigues
	Solutti Tecnologia
	http://www.solutti.com.br

	Minha armadilha de SPAM, NÃO mandem email
	[email protected]
	My SPAMTRAP, do not email it