Re: IPTABLES rules lost at reboot.

From: Chris Lowth (dont_at_want.spam)
Date: 05/21/03

  • Next message: Fred Tourette: "Re: POP3, SSL, Outlook Express and certificates"
    Date: Wed, 21 May 2003 11:24:16 +0100
    
    

    Mairhtin O'Feannag wrote:

    > Hello,
    >
    > 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.

    Then..
    "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

    Chris

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

  • Next message: Fred Tourette: "Re: POP3, SSL, Outlook Express and certificates"

    Relevant Pages

    • Re: F11 iptables cant disable
      ... it stops and the GUI says so. ... And it stays disabled and not running when you reboot ... Now do that with iptables. ... I don't run Fedora as servers - perhaps someday I might but I tend to ...
      (Fedora)
    • Re: my iptables setting not loaded after reboot in fc5
      ... Hongwei Li escribió: ... survive after a reboot. ... iptables before setting them up, and that's why you don't get any rules ... opened -- all of my settings are gone. ...
      (Fedora)
    • Re: IPTABLES Question
      ... Thanks Chris, that helped me understand more of what IPTABLES is doing, but ... It had no effect until I rebooted the firewall. ... > that allows established sessions. ... >>This appears to work for the game ports only AFTER I reboot the firewall. ...
      (linux.redhat)
    • Re: Redhat 7.2 server lose IP address by itself
      ... Thanks Jack. ... "ipchains" was not compatible with the ... But after it went offline again, this time after I reboot it, ... I got error saying the iptables or kernel need to be upgraded. ...
      (comp.os.linux.security)
    • Re: my iptables setting not loaded after reboot in fc5
      ... survive after a reboot. ... iptables before setting them up, and that's why you don't get any rules now. ... opened -- all of my settings are gone. ... I will try Firestater. ...
      (Fedora)