AMP AMP
AMP
0
AMP

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
a sample image
david
asked May 23 2017

Answer

AMP
0
AMP

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
a sample image
jagannatharumugam
asked May 23 2017
edited Oct 05 2018
Post your Answer