Results 1 to 7 of 7

Thread: Iptables

  1. #1
    Member
    Join Date
    Jul 2008
    Posts
    23

    Question Iptables

    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. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,307
    cPanel/WHM Access Level

    Root Administrator

    Default

    Quote Originally Posted by offline View Post
    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
    Here's a page that will help: http://blog.cpanel.net/?p=55

  3. #3
    Member
    Join Date
    Jul 2008
    Posts
    23

    Default

    Thanks a million!!!

  4. #4
    Member
    Join Date
    Sep 2007
    Posts
    26

    Default

    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. #5
    Member verdon's Avatar
    Join Date
    Nov 2003
    Location
    Northern Ontario, Canada
    Posts
    792

    Default

    Try this awesome script...
    http://configserver.com/cp/csf.html

  6. #6
    Member
    Join Date
    Sep 2007
    Posts
    26

    Default

    Quote Originally Posted by verdon View Post
    Try this awesome script...
    http://configserver.com/cp/csf.html
    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. #7
    Member verdon's Avatar
    Join Date
    Nov 2003
    Location
    Northern Ontario, Canada
    Posts
    792

    Default

    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.

Similar Threads

  1. Replies: 14
    Last Post: 05-18-2011, 12:23 PM
  2. iptables
    By bigpy2003 in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 03-19-2004, 05:26 PM
  3. IPTables
    By Bart™ in forum cPanel & WHM Discussions
    Replies: 3
    Last Post: 02-29-2004, 06:14 AM
  4. iptables
    By cyberspirit in forum cPanel & WHM Discussions
    Replies: 12
    Last Post: 07-14-2003, 11:02 PM
  5. iptables
    By (SH)Saeed in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 11-04-2002, 03:39 AM