Admins eHow

August 27, 2009

How to clear all iptables rules

Filed under: CentOS,Debian,General,Security — Tags: , , , — FiFtHeLeMeNt @ 2:08 pm

In order to flush all iptables rules , Run the following commands :

iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT

1 Comment »

  1. If your default policy is DROP make sure to change the INPUT FORWARD and OUTPUT policy before the -F or you will be locked.

    Comment by vaL — July 28, 2010 @ 9:59 am

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress