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.

Changing the port number of Cpanel

Discussion in 'General Discussion' started by myweb, Jul 7, 2003.

  1. myweb

    myweb Well-Known Member

    Joined:
    Jun 18, 2002
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Tokyo
    Is is possible to change the port number of CPanel?
    Where is it defined anyway? I can't find it in /etc/serveices.

    cPanel.net Support Ticket Number:
     
  2. creos

    creos Active Member

    Joined:
    May 11, 2003
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    San Jose, CA
    It isn't.. not of cpanel anyway,

    But you can configure stunnel to point to cpanel & open it up on another port.

    For example:

    do a ps aux | grep stun to see where stun is reading it's config file from:

    /usr/bin/stunnel-4.04local /usr/local/cpanel/etc/stunnel/mycabundle/stunnel.conf

    Edit the /usr/local/cpanel/etc/stunnel/mycabundle/stunnel.conf

    File. For cpanel you would add something like this:

    [cpanelhttps2]
    accept = 5190
    connect = 2082
    TIMEOUTclose = 0


    As you can see i've added this so that cpanel listens on AIM's port. This is because at my work we block most ports & it's the only way to connect to cpanel.

    Now you can just kill -9 the pid of stunnel, then restart it & you'll be able to connect.

    Note the side effects:

    "Last login from $host" will show localhost.. though you will still have the actual host in the log files, just the stunnel ones.

    You need to use https://yourserver:5190 (or whatever port you used) & can't use http.

    That's about all I've found.. works great for me. I really wish cpanel would just work over regular old ssl & not force us to use these horrible ports. When you're inside of ANY large company or any company with decent network admins they are going to have most ports closed with the exception of 80,443 & *maybe* some chat services. The lucky ones will just be denying traffic & keeping state on outbound connections which is why i bet cpanel hasn't gotten alot of complaints.

    For me it's a plus--- most people say "oh i can't use cpanel my work firewall blocks it" and I find out what port they can use & we make it work. Hey it's another customer! ;)

    Oh yes.. cpanel won't support anything that's broken if you're using another port... so, if you have a problem make sure you STILL have the problem if you aren't using your extra port.

    cPanel.net Support Ticket Number:
     
  3. ThunderHostingDotCom

    ThunderHostingDotCom Well-Known Member

    Joined:
    Nov 18, 2002
    Messages:
    450
    Likes Received:
    1
    Trophy Points:
    16
    Location:
    All over!
    Where in the file would I add this?
    Do I have to remove or replace anything?
    Will this still allow access to the normal ports?
    Can I set it to port 8080 or would that effect how port 80 is viewed?

    [cpanelhttps2]
    accept = 5190
    connect = 2082
    TIMEOUTclose = 0

    Can this be used for WHM & WebMail also? One client we have bloacks those ports also! :mad:
     
  4. projectandrew

    projectandrew Well-Known Member

    Joined:
    Aug 27, 2003
    Messages:
    185
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    United Kingdom
Loading...

Share This Page