search

Loading

Saturday, June 8, 2013

Delete all iptables rules in linux

We have seen how to remove a particular IP from the iptables rule. Now what if we want to remove all the iptables rule?

We can use the below command to remove all iptables rule.


iptables --flush

If we want to remove a particular chain rule use below command:

iptables --flush 'chain name'

For example, to remove all INPUT rules use below command:

iptables --flush INPUT

Finally save it by running the below command:

/etc/init.d/iptables save

No comments :

Post a Comment