• Home
  • iptables list add remove by line number

iptables list add remove by line number

February 25, 2015 Ning 0 Comments

List all rules with line number:

iptables -nL --line-numbers

Block all access from 46.151.0.0/16 range at line 12:

iptables -I INPUT 12 -s 46.151.0.0/16 -j DROP

delete rules based on their number and chain name:

iptables -D INPUT 12

leave a comment

*