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

Discussion in 'General Discussion' started by offline, Sep 10, 2008.

  1. offline

    offline Member

    Joined:
    Jul 10, 2008
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Centos sets up a default set of ip table rules when installed. What ports should I open up in Iptables to allow cpanel to do its job?

    Thanks!

    Chris
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Here's a page that will help: http://blog.cpanel.net/?p=55
     
  3. offline

    offline Member

    Joined:
    Jul 10, 2008
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Thanks a million!!!
     
  4. McPhil

    McPhil Active Member

    Joined:
    Sep 20, 2007
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    OK, so I've recently installed cpanel/whm on a fresh CentOS 5.2 server and I'm running into some issues with the IPTABLES.

    I've only gone in and opened ports 2083, 2087, and 2089 in addition to the existing open ports. ports already open are: 22, 80, 443, 53 (udp/tcp), 69 (udp/tcp), 25, 110, 123 (udp), 20, 21, 3306 (udp/tcp), 5555, 8002, and 9001.

    This is the what I've done:

    1. nano /iptables/sysconfig/iptables
    2. added in the needed ports for cpanel, whm and license port.
    example: -A INPUT -p tcp -m tcp --dport 2083 -m state --state NEW -j ACCEPT
    3. Ctrl + x to write-out and save
    4. iptables-save
    5. /etc/init.d/iptables save
    6. service iptables restart

    Upon restart, I can now access WHM and cPanel and works great and having fun learning...; however, now FTP access is knocked out along with HTTP, HTTPS to the domain. Cannot access the website at all. So I do the steps again at the top only removing the new ports I've put in and then steps 4, 5, and 6. Now I can't access WHM or cPanel (as expected) but now FTP and Http and Https to the website is perfect.

    I know this isn't an IPTABLES forum per se but does anyone see a glaring error with what I'm doing (or not doing)?

    Is there a way to use WHM or cPanel to add and remove ports in the IPTABLES?

    Cheers,
    Phil
     
  5. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
  6. McPhil

    McPhil Active Member

    Joined:
    Sep 20, 2007
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Absolutely Bloody Brilliant!!! Verdon, you have made my day. I set csf up, configured and rebooted the server 3 times and the firewall setting are still what I set them too which was a big problem without csf. Cheers mate -Phil
     
  7. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    Also well worth installing are his free Mail Manage and Mail Queues tools. I also used his paid Mailscanner package and have no regrets. Good product. Good service. Good support.
     
Loading...

Share This Page