Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

Here are some rules that I append to filter table, and I list the added output related to each one:

  1. $iptables -A INPUT -i eth0 -j ACCEPT

and the output is:

target     prot opt source               destination         
ACCEPT     all  --        

The second command:

  1. $iptables -A INPUT -i eth1 -j ACCEPT

And the appended rule to INPUT chain is the same as the first one:

target     prot opt source               destination         
ACCEPT     all  --        

As you see, I changed the source of packets from eth0 to eth1, but I don't see it reflected in the appended rule. Can anybody explain me where is the difference made or how the iptables knows that first rule is related to eth0 and second rule is related to eth1?


share|improve this question
When you list the tables, try adding a -v – Jon Lin Jan 17 '12 at 7:30
@JonLin Thanks! I see the Output very well. You can post your comment as answer I think. Thanks! – artaxerxe Jan 17 '12 at 7:32
up vote 3 down vote accepted

When you list the tables, try adding a -v, which will give you columns for the number of packets/bytes as well as the input and output interfaces.

share|improve this answer

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.