Linux Disable / Remove The Iptables Firewall

by on December 30, 2006 · 3 comments· LAST UPDATED December 22, 2008

in , ,

Q. How do I disable the iptables firewall in Fedora Core Linux?

A. Iptables is used to set up, maintain, and inspect the tables of IP packet filter rules in the Linux kernel.

If you are using RHEL (Redhat), Fedora core or Cent os Linux just type following commands to disable the iptables firewall:
# service iptables save
# service iptables stop
# chkconfig iptables off

If you are using any other Linux distribution type the following command to clear up firewall rules:
# 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 OUTPUT ACCEPT

You may need to put above rules in a shell script and execute the same. Also remove your iptables startup script from your network configuration file such as /etc/network/interfaces. Look for post-up directive.

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 3 comments… read them below or add one }

1 Raph October 5, 2009 at 11:01 pm

Is there a way I can make some sort of bridge connection and if not, were do I type in this code

Reply

2 Matteo Cappelli April 8, 2010 at 1:38 pm

Simple and useful article! Now I understand how to disable iptables :-)… How is it possible to disable iptables in other distributions? Does the “service iptables stop” command work?

thanks

Reply

3 Wagner Bianchi November 15, 2013 at 2:12 pm

It seems not that effective. When I restart server iptables will be up again!

Reply

Leave a Comment

Tagged as: , , , , , , , , ,

Previous Faq:

Next Faq: