Main Menu

Search

LINUX: IPTABLES: How To List iptables with Line Numbers? ("IP Filters")

Below is the command to list the iptables with line numbers
iptables -L --line-numbers

Below is example output of above command which shows line numbers for some of the filers under INPUT policy.
# iptables -L --line-number
Chain INPUT (policy DROP)
num  target     prot opt source               destination
1    ACCEPT     all  --  10.10.10.20          anywhere
2    ACCEPT     all  --  localhost            anywhere

Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination


Products to which Article Applies

All Linux Operating Systems


Additional References

https://linux.die.net/man/8/iptables



tarun boyella


No comments:

Post a Comment