Search This Blog

iptables: delete a rule

 # delete the rule by specifying the whole rule
iptables -D INPUT -p tcp -m state --state NEW -m tcp --dport 4000 -j ACCEPT
 # list the rules with line numbers
iptables -L INPUT --line-numbers

# delete the rule by specifying the line number of the rule (suppose the line number of the rule is 2).
iptables -D INPUT 2

No comments:

Post a Comment