Re: IPTABLES rules lost at reboot.
From: Chris Lowth (dont_at_want.spam)
Date: Wed, 21 May 2003 11:24:16 +0100
Mairhtin O'Feannag wrote:
> I have a problem in that (along with having difficulty posting to this
> group - sigh) every time I reboot, I lose my IPTABLES settings. I
> have a script, which we'll call iptables-script, which contains my
> IPTABLES rules. I run the following commands to establish my firewall
> /etc/init.d/iptables stop
> sh /etc/sysconfig/iptables-script
> iptables-save > /etc/sysconfig/iptables
> /etc/init.d/iptables start
> And all is well. But ... once I reboot, I lose all of my settings.
> *scratching head* what am I doing wrong? I thought the iptables-save
> command would save the settings between sessions? Where might I look
> for more information on why this is going wrong?
> Mairhtin O'Feannag
What distro are you using. If it's a RedHat one, you need to enable the
iptables service using (as one option) the ntsysv command.
"service iptables save" - will save the firewall for restore at reboot.
"service iptables stop" - to turn iptables off (wipes in-memory config)
"service iptables start" - to turn iptables in and restore saved config
-- Real address: chris at lowth dot sea oh em. For GPL e-mail anti-virus, IPTables wizzards, web filtering for Smoothwall and IPCop, Security and Linux book recommendations go to -- http://www.lowth.com