I'm trying to disable the firewall with no luck. I have tried:

  • Going through System->Administration->Firewall and disabling it there.
  • Running 'iptables -F' and then /etc/init.d/iptables save
  • I've tried disabling SELinux

Whenever I reboot, the iptables rules are still there. If I run '/etc/init.d/iptables restore' then I get an empty list, but once I reboot all the rules are back. It seems like some other process is starting iptables and populating it with rules

  • execute iptables -nL and compare this with /etc/sysconfig/iptables to see if rules from this file are loaded if not try to find files in your system with rules currently loaded maybe then you find what app is using iptables – B14D3 Sep 27 '12 at 6:37
  • Execute 'service iptables stop' on redhat derivitives to stop a service. (Only until next reboot) Use chkconfig to disable services at boot time. – Ryan Griggs May 28 '14 at 2:05
  • Out of morbid curiosity, why do you want to completely disable iptables in the first place? You're just replacing it with a different firewall, right? Not... I mean you're not actually seriously considering not having a firewall at all, right? – Parthian Shot Jul 17 '14 at 19:49

/etc/sysconfig/system-config-firewall contains a line that the gui seems to read to determine the firewall state. Setting this to --disabled in addition to the chkconfig iptables off instructions seems to work for me.


I'm not sure because I had never use CentOS 3 but in newer version disabling iptables on startup can be accomplished by executing: chkconfig iptables off

Rules in Centos 5 and 6 are stored in /etc/sysconfig/iptables

  • I have disabled iptables with chkconfig. iptables is not configured to run on startup, but it looks like some other process is starting it up and adding rules. – njc Sep 26 '12 at 13:38

It's possible some other firewall software has been installed and enabled to start on boot that is using iptables. If the software uses traditional init scripts it is likely it has a file in /etc/init.d/. If that is the case you may be able to find it by looking for all init scripts with a reference to iptables by grepping through the init scripts, for example:

grep -li iptables /etc/init.d/*

The service would also likely be configured to start in your default runlevel, which you can identify and disable with the command chkconfig.


I replaced the /sbin/iptables binary with a script that told me things about the process. Tracked the issue to libvirtd. If you don't need libvirtd, try turning it off. This worked for me.


  • libvirtd should only be adding its own firewall rules, not restoring other rules. – Michael Hampton May 28 '14 at 1:26

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.