iptables -L --line-numbers
iptables --list
//inserting rules
iptables -I INPUT -p tcp --dport 80 -j ACCEPT //inserts a rule on top
iptables -I INPUT 5 -p tcp --dport 21 -j ACCEPT //inserts a rule on the 5th position
//deleting rules by line number
iptables -D INPUT 5 //deletes the 5th rule
//saving rules
service iptables save //centos
Comments
Comments are not available for this entry.