0

how to delete a rule in IPtables

I have created many IPtables rules in my linux machine. Instead of altering the rule, i need to delete a particular rule. how can i do that.

Iptables Add a comment
david
asked May 23 2017

Answer

0

You can use -D option as follows.

If you have four rules and to delete 2nd, then run the below command to delete that rule.

# iptables -D INPUT 2
Add a comment
jagannatharumugam
asked May 23 2017
edited Oct 05 2018
Post your Answer