The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

iptables Keeps Resetting upon reboot

Discussion in 'General Discussion' started by scoob512, Jan 6, 2014.

  1. scoob512

    scoob512 Registered

    Joined:
    Jan 5, 2014
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I am running CentOS release 6.5 (Final)
    Linux vps.albertautin.com 2.6.32-042stab081.5 #1 SMP Mon Sep 30 16:52:24 MSK 2013 x86_64 x86_64 x86_64 GNU/Linux

    And had cPanel previously installed. I used "yum remove cpanel" to get rid of some of it, and I know it's not all gone but trying to see what I can recover from it. [Accidental Installation]

    Now my main problem right now, is that, whenever I reboot after making an edit to /etc/sysconfig/iptables or use a chain like iptables -I or iptables -A - my iptables are reset.

    I have used "service iptables save" and tried numerous other things to get them to retain. The rules show up in iptables -L initially, even if I restart iptables they still show, but when the server is rebooted the iptables are reset.

    I was thinking it may be something like a startup script in /etc/rc*.d, but I'm just now knowledgeable enough to track it down.

    I think it may be possibly related to some sort of cPanel script, but was curious if someone could help me track down the cause and provide a possible solution?

    Thanks so much,:confused:
    Al
     
  2. cPPhilS

    cPPhilS Member
    Staff Member

    Joined:
    Dec 12, 2012
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Re: IPTABLES Keep Resetting upon reboot

    Hello,

    cPanel does not make any configuration changes to iptables, so this would an Operating System configuration issue.

    Please be advised that iptables and firewall configurations are outside of cPanel's scope of support. Information provided here is provided as a courtesy and should be acted upon with your own due diligence and discretion.

    The starting ruleset for iptables will be located at /etc/sysconfig/iptables . The following documentation should be helpful in this configuration:

    HowTos/Network/IPTables - CentOS Wiki
    43.9.4.****Saving IPTables Rules


    Also, be sure chkconfig is set to start iptables for your default/current runlevel;

    To get your runlevel:

    Code:
    # runlevel
    N 3
    
    #chkconfig --list iptables
    iptables       	0:off	1:off	2:on	3:on	4:on	5:on	6:off
    
    If 3 is off, then run:

    Code:
    # chkconfig iptables on
    
    I hope that helps!
     
Loading...

Share This Page