Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I have two NICs; eth0 and eth1.

Does this rule then allow all outgoing traffic on all NICs?


Or do I have to

iptables -A OUTPUT -o eth0 -j ACCEPT
iptables -A OUTPUT -o eth1 -j ACCEPT


share|improve this question
iptable rules work as a list and are evaluated in order on a per packet basis, not per interface. the -P rule is the default rule if no others match so affects any packets that get to the end of the list unmatched. – Sirex Oct 28 '11 at 9:15
up vote 1 down vote accepted

The -P flag to iptables sets policies on the built-in chains. That is, they set the default disposition for packets which make it all the way through a built-in chain without matching a single dispositive rule.

If you only have two NICs (eth0, eth1), and no other rules in your OUTPUT chain, there is no difference between the two setups you posted above.

share|improve this answer
Would that also make iptables -A INPUT -o lo -j ACCEPT obsolete? – Sandra Oct 28 '11 at 12:00
Setting the policy to ACCEPT means that any packet that matches no dispositive rule will be ACCEPTed, so yes, it does make that rule obsolete. – MadHatter Oct 28 '11 at 12:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.