Is there a way to show the network interfaces via iptables -L in Ubuntu 12.04?

When I execute an iptables -L I get an output like this :

Chain INPUT (policy DROP)
target     prot opt source               destination       
ACCEPT     all  --       

which is somehow misleading. First I was thinking, great rule, allows everything until I discovered that this rule is bound to interface localhost.

Is there a way to get an overview which shows the rules and the interfaces at once?


Add -v for the verbose mode.

Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
39050 4448K ACCEPT     all  --  lo     *             
 6595  544K ACCEPT     icmp --  *      *             
  419 15084 ACCEPT     2    --  *      *             

Even better, change the command to -S for plain mode:

-A INPUT -i lo -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -p igmp -j ACCEPT
| improve this answer | |

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.