How can I to change http://ip-address:2222 to https://ip-address:2222

Somyot

New member
Joined
Sep 5, 2024
Messages
2

Attachments

  • need https.jpg
    need https.jpg
    171.2 KB · Views: 121
Hello, bumping this topic again, I can access via IP:2222 and login trough it (using of course the OTP - but still...) How this can be avoided?
 
How this can be avoided?
Not. There are no long term SSL's for ip adresses. An SSL for an ip address is something completely new. As far as I know only Letsencrypt is issueing them now and only for a very short period like 1 week or something like that.
I don't think DA supports that already at the moment, also because it's not much use since it's very short term certificates.

If you want to access directadmin, just user the domain name or hostname, easier to remember too.
You can access any domain name on the server, as long as you use your own credentials, you will login to the correct part of the DA panel.
 
Thanks for your reply, but it is safe? If of course not used in not known networks/wifi etc. I mean if we use the https:// to login etc. I am trying to redirect that IP to my site so its not available to public, I've seen that in some solutions.
 
Ofcourse it's safe if you use the https://domain.com:2222 or https://server.domain.com:2222 because it's SSL.

There might be people trying to bruteofice http://ip.ad.re.ss:2222 but that doesn't matter as it does not matter if they bruteforce with or without https. The s in https is only stating that a correct connection is made safely. And it doesn't matter if incorrect connections by a hacking attempt are not safe. Most hosters have it this way.

However, it might be possible to redirect the http://ip.ad.re.ss:2222 to your website. Probably via the index.html in /var/www/html or by creating a redirect in .htaccess in there or something, but don't hang me on that, because now I'm just guessing.
 
You can't. It's not available for ip addresses. Normally the login is not used via ip anyway.

You can use https://domain.com:2222 or https://server.domain.com:2222 if you created a hostname in DNS and a certificate for it.
https is available for IP addresses, but it's a short term fix and not something implemented out of the box with DA. OP should use a correct hostname and DNS to setup SSL as you suggested though as best practice.
 
You are correct. But that's why I wrote it's not available, because it's only for max. 7 days and here it's intended to visit te DA interface, so not suitable.
Yeah, and that just reminded me of that demo site I created last year.. Still up and running with the cron renewing the ACME Cert every few days 🤣 🤣 🤣 I Totally forgot about that lol!
 
Oh well then it can be used. However, it's better and easier to connect via a domain name, easier to remember too. And no need for manual integration and stuff. :)
 
Back
Top