IPTables – Delete rule by number

We look at the rules in all chains:

iptables -L --line-numbers

Can be viewed in a specific chain:

iptables -L INPUT --line-numbers
iptables -D INPUT RULE_NUMBER

See the rules in NAT:

iptables -t nat -L POSTROUTING --line-numbers
iptables -t nat -D POSTROUTING RULE_NUMBER

Tagged: Tags

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments