Iptables Make Rules On Different Interface? "iptables - L" shows no difference!
hi all,
I want to make iptables impose different rules on two ethernet interfaces.
I would like to make restriction on external interface (eth0), but allow any traffic in and out of internal interface (eth1). iptables -A INPUT -i eth1 -s 0/0 -d 0/0 -j ACCEPT
iptables -A OUTPUT -o eth1 -s 0/0 -d 0/0 -j ACCEPT
when applying these rules, iptables -L
it shows
Chain INPUT (policy DROP)
target prot opt source destionation
Accept all -- anywhere anywhere
Chain OUTPUT (policy DROP)
target prot opt source destionation
Accept all -- anywhere anywhere
There is no place to differentiate interface eth0 or eth1
Anyone could give me some hints?
Thank you in advance.
BEST REGARDS
kurt
---------------------------------
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger
Quoted 2 lines · ke chen
I want to make iptables impose different rules on two ethernet interfaces.
[...]
Quoted 5 lines
when applying these rules, iptables -L
it shows
Chain INPUT (policy DROP)
target prot opt source destionation
Accept all -- anywhere anywhere
You need to use the -v option, which causes iptables to show you the interface associated with a rule.
Ciao,
Sheldon.