Search

domingo, 3 de julho de 2011

How to: Disable IPTables

If you need to disable your iptables (not recommended) this is the way to do it.


Difficult: easy
Avg Time: 5min


You need to be logged as root to disable iptables.


Disable iptables on Ubuntu/Debian.

1º - Save your current iptables config, to restore later if needed.
iptables-save > /root/iptables.backup
2º -  Make this commands
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
3º - Now if you would like to restore your old config, do this
iptables-restore < /root/iptables.backup

Disable iptables Centos/RedHat/Fedora.


Disable iptables on Centos/RedHat/Fedora it's much simple!

1º - Save current config and Stop
/etc/init.d/iptables save
/etc/init.d/iptables stop
2º - Start iptables again 
/etc/init.d/iptables start

If you have any problem leave a comment

Sem comentários:

Enviar um comentário