Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    51
    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,608
    Likes Received:
    32
    Trophy Points:
    238
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice