Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
1  
CentOS 3 ? Realy ? Or 3 is some kind of typo ? – B14D3 Sep 26 '12 at 13:01
@B14D3 You're right, it was a typo. I'm running 6.3 – njc Sep 26 '12 at 13:37
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

3 Answers

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

share|improve this answer
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

/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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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