Forcing HTTPS on insecure login

cwihost

Member
Sep 9, 2001
24
0
306
Is there a away to force users logging in with http://servername:2082 or http://IP:2082 to the secure port. Also the same request for WHM logins via the port.

I am aware of the option in tweak settings to force /whm /webmail and /cpanel to secure connections however this is only for the direct URL match. I already have that enabled and it works with respect to what it does. However even with that option on someone can access :2082 or :2086 and still gain access.

I tried a IPTables rule to forward port 2082 to 2083 and 2086 to 2087 etc. However an error occurs when doing this as the http:// needs to change to https:// to work.

Does anyone have any ideas on this?
 

cwihost

Member
Sep 9, 2001
24
0
306
Draknet:

How are you setting this up on your server? I just want to make sure that they cannot login with the insecure ports still.
 

jenlepp

Well-Known Member
Jul 4, 2005
116
2
168
Liberty Hill, TX
cPanel Access Level
DataCenter Provider
I purchased certs for the server names and installed them (without that, the self-signed style will give errors and I think, on IE7, will choke and not even let you go to the page).

Under "Server Config/Tweak Settings" in WHM I have:

Always redirect users to the ssl/tls ports when visiting /cpanel, /webmail, etc. checked
When visiting /cpanel or /whm or /webmail with SSL, you can choose to redirect to:
Hostname checked

And I think I had to restart cPanel to get it to take, but that's it.