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.

problem with iptables and cpanel on a new installation

Discussion in 'General Discussion' started by pikuser5, May 19, 2011.

  1. pikuser5

    pikuser5 Member

    Joined:
    Mar 3, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    hi,
    today i have installed centos 5.6 and cpanel on my ovh server.

    but with iptables enabled i can't access whm and other...

    if i type /etc/init.d/iptables stop ----- all works ok.
    i have installed cfs...
    what should i do with iptables?

    thank's
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    By "i have installed cfs" do you mean that you've installed CSF for ConfigServer Security & Firewall on the machine?

    You likely need the cPanel, WHM and webmail ports to be opened:

    cPanel ports - 2082 (non-secure) and 2083 (secure)
    WHM ports - 2086 (non-secure) and 2087 (secure)
    webmail ports - 2095 (non-secure) and 2096 (secure)

    If you were only running iptables without CSF, you could run these commands to add those ports to iptables:

    Code:
    /sbin/iptables -I INPUT -p tcp -m tcp --dport 2082:2083 -j ACCEPT
    /sbin/iptables -I INPUT -p tcp -m tcp --dport 2086:2087 -j ACCEPT
    /sbin/iptables -I INPUT -p tcp -m tcp --dport 2095:2096 -j ACCEPT
    After adding the ports, you would then save the configuration:

    Code:
    service iptables save
    For CSF, you'd have to go into the Firewall configuration area and find the TCP_IN section, then add the ports there I believe.
     
Loading...

Share This Page