After reboot /etc/sysconfig/iptables changed

Issues related to configuring your network
Post Reply
archana
Posts: 7
Joined: 2014/03/03 12:24:29

After reboot /etc/sysconfig/iptables changed

Post by archana » 2014/03/06 10:26:06

Hi,
I have configured the firewall on CentOS with the iptables. I am able to access my website on the CentOS server from windows PC but when I reboot server the /etc/sysconfig/iptables was changed and I was failed to access my website.

Kindly let me know If there is any way to save iptables files permanently so that I could access my website from other client machine.

Thanks!

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: After reboot /etc/sysconfig/iptables changed

Post by TrevorH » 2014/03/06 12:20:55

Code: Select all

service iptables save
That will save the currently running rules. You can also edit /etc/sysconfig/iptables-config and change it so that it saves the rules on restart and/or stop but mostly this is not a good idea - e.g. you add a bad rule and lock yourself out and then that rule is saved when you stop iptables.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

archana
Posts: 7
Joined: 2014/03/03 12:24:29

Re: After reboot /etc/sysconfig/iptables changed

Post by archana » 2014/03/19 05:32:27

Thanks . now I am able to save rules. :)

Post Reply