Page 1 of 1

CentOS Startup Script

Posted: Thu Sep 13, 2012 12:49 am
by stebbo
Hi All,

I've just started getting DHCP offer errors, and was able to fix it via the advice from this thread
http://support.nagios.com/forum/viewtop ... 07&p=31206

I'd like to add the iptables command to the CentOS startup script so that I don't have to remember to do it each time the system restarts. Can anyone point me to the system startup script please?

Ta muchly,
Chris.

Re: CentOS Startup Script

Posted: Thu Sep 13, 2012 9:32 am
by CGraham
did you run

"service iptables save"

after the iptables change? I believe that makes the changes permanent.

Re: CentOS Startup Script

Posted: Thu Sep 13, 2012 10:08 am
by lmiltchev
In addition to the last post, open the "iptables-config":

Code: Select all

vi /etc/sysconfig/iptables-config
and make sure you have the following lines:

Code: Select all

IPTABLES_SAVE_ON_STOP="yes"
IPTABLES_SAVE_ON_RESTART="yes"
Hope this helps.

Re: CentOS Startup Script

Posted: Fri Sep 14, 2012 4:22 am
by stebbo
Thanks all,

I have done those.

Cheers,
Chris.