0

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  --  0.0.0.0/0            0.0.0.0/0      

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  --  0.0.0.0/0            0.0.0.0/0      

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?

Thanks!

2
  • 3
    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
3

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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