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.

how can i change port of WHM from 2086 to another port

Discussion in 'Security' started by Linux.RedHat, Aug 18, 2010.

  1. Linux.RedHat

    Linux.RedHat Registered

    Joined:
    Aug 17, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hello


    how can i change port of WHM from 2086 to another port


    thanks for helping


    best regardis
     
  2. Linux.RedHat

    Linux.RedHat Registered

    Joined:
    Aug 17, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    ?????

    i need that information
     
  3. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Is there a specific reason you are needing to change only the non-SSL port for WHM? Are you needing to change any other ports used by cPanel and WHM, including those for access to Webmail or cPanel Web Disk (WebDAV)?

    Out of curiosity, are you only needing to prevent or block access to WHM via its non-SSL port, perhaps to require use of SSL ports?

    It is not currently possible to modify the port numbers used to access WHM; however, if you would like an enhancement making that possible I would consider posting a detailed and constructive feature request in the following forums area where the idea can gain more attention: Feature Requests for cPanel and WHM - cPanel Forums
     
  4. disappointed

    disappointed Active Member

    Joined:
    May 25, 2007
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Houston
    if you just want the port closed and you do not want attacked then you can do this...

    You have to loop it back for cpanel first before closing it to the world or you will have errors and you will get emails about it

    iptables -A INPUT -s xxx.xxx.xxx.xxx -p tcp -m tcp --dport 2087 -j ACCEPT
    iptables -A INPUT -s xxx.xxx.xxx.xxx -p udp -m udp --dport 2087 -j ACCEPT
    iptables -A INPUT -s xxx.xxx.xxx.xxx -p tcp -m tcp --dport 2086 -j ACCEPT
    iptables -A INPUT -s xxx.xxx.xxx.xxx -p udp -m udp --dport 2086 -j ACCEPT

    Place your ip in between this rule so you can get in
    iptables -A INPUT -s 12.96.0.0 -j ACCEPT <-- replace with your ip our you will not be able to use the service
    iptables -A INPUT -s 12.96.0.0 -j ACCEPT <-- Cpanel Corp
    iptables -A INPUT -s 12.96.0.0 -j ACCEPT <-- Your Data Center Tech Support

    iptables -A INPUT -p tcp --dport 2086:2087 -j DROP
    iptables -A INPUT -p udp --dport 2086:2087 -j DROP

    This will block the service to the outside and drop all incoming connections except to cpanel


    xxx.xxx.xxx.xxx = localhost

    so this has to be set to the local host ip what ever your using in your box.

    hey dont forget to save

    /etc/init.d/iptables save

    This would only let you use the service, you might want to put cpanels ips in there as well and your data centers ips too.
     
    #4 disappointed, Aug 19, 2010
    Last edited: Aug 19, 2010
Loading...

Share This Page