FreeKB - iptables remove a rule (-D --delete)
iptables - remove a rule (-D --delete)

Let's say iptables --list-rules command returns the following output. The nice this about this output is that is provides you with the exact format that can be used to delete a rule.

~]# iptables --list-rules
-A INPUT -d ! -i eth0 -p tcp -m tcp --dport 80 -j ACCEPT


Here is how you would delete a rule. You simply take the above output and replace -A (append) with -D or --delete.

iptables -D INPUT -d ! -i eth0 -p tcp -m tcp --dport 80 -j ACCEPT


Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter e7b4d in the box below so that we can be sure you are a human.


Web design by yours truely - me, myself, and I   |   |