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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Redirect WHM, Webmail to specific domain instead of IP

Discussion in 'Security' started by BastienC, Dec 12, 2017.

  1. BastienC

    BastienC Member

    Joined:
    Feb 11, 2016
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    QC
    cPanel Access Level:
    Root Administrator
    I'm accessing my WHM/Webmail through https://myserver.mydomain.com:2087 (or :2083)

    But I can also use the IP address directly and it will work, but of course not the HTTPS.
    Is it possible to force it to redirect to a domain ?
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,009
    Likes Received:
    341
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Have you tried accessing via example.com/cpanel or example.com/whm?
     
  3. BastienC

    BastienC Member

    Joined:
    Feb 11, 2016
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    QC
    cPanel Access Level:
    Root Administrator
    No, directly https://x.x.x.x:2087

    accessing /whm or /cpanel does direct me to the corresponding port
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,009
    Likes Received:
    341
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Are you aware of these settings?
    WebHost Manager »Server Configuration »Tweak Settings, Redirection tab
     
  5. BastienC

    BastienC Member

    Joined:
    Feb 11, 2016
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    QC
    cPanel Access Level:
    Root Administrator
    Yes, I tried all 3 options for SSL Redirection destination, no luck.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    41,516
    Likes Received:
    1,616
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    There are no options available to automatically redirect users who utilize the specific port numbers in the URL. The options under the "Redirection" tab in "WHM >> Tweak Settings" are available to redirect users to the SSL/TLS ports when visiting /cpanel, /webmail, /whm, etc. Here's a post you may find helpful if you are open to a custom firewall workaround (it's for a different purpose but the same concept applies):

    SOLVED - Prevent domain.com:2082 logins

    Thank you.
     
  7. BastienC

    BastienC Member

    Joined:
    Feb 11, 2016
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    QC
    cPanel Access Level:
    Root Administrator
    I'm not sure I get how this can help me, since myserver.mydomain.com already resolve to the same IP I'm trying to block the access from.

    Can I do something like this ?
    w.x.y.z|2083|myserver.mydomain.com|2083|tcp
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    41,516
    Likes Received:
    1,616
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    It would only apply as a workaround if your accounts resolved to separate IP addresses and accessed cPanel/WHM via their domain name (e.g. domain.tld/cpanel). If it's the same IP address, then there's no other workaround I'm aware of.

    Thank you.
     
Loading...

Share This Page