Sunday, October 12, 2014

Howto disable the iptables firewall in Linux

Howto disable the iptables firewall in Linux



Task: Enable / Turn on Linux Firewall (Red hat/CentOS/Fedora Core)
Type the following command to turn on iptables firewall:

# /etc/init.d/iptables startOther Linux distribution

If you are using other Linux distribution such as Debian / Ubuntu / Suse Linux etc, try following generic procedure.

Save firewall rules

# iptables-save > /root/firewall.rules
OR
$ sudo iptables-save > /root/firewall.rulesNow type the following commands (login as root):
# 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

To restore or turn on firewall type the following command:
# iptables-restore < /root/firewall.rulesGUI tools

No comments:

Post a Comment