I can't access with https to my apache2 server from the internet

My domain is:homebadajoz.ddns.net
Server version: Apache/2.4.52 (Ubuntu)
Server built: 2024-01-17T03:00:18
The operating system my web server runs on is (include version):Ubuntu server 22.04.4 LTS
I can login to a root shell on my machine (yes or no, or I don't know): yes
I'm using a control panel to manage my site (no, or provide the name and version of the control panel):no
The version of my client is : 2.10.0
Computer: Raspberry-pi

Router with ports 80 and 443 redirected to the raspberry-pi.
Firewall disabled.
I have checked that my IPS has not blocked port 443.

After installing apache2 [sudo apt install apache2 ], I can access the apache test page from my LAN and from the Internet with http:homebadajoz.ddns.net.

I then install the certificates to enable https with the following commands:
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
sudo certbot --apache
sudo certbot renew --dry-run

When it asks for the domain I put homebadajoz.ddns.net
No error message occurs, after finishing I restart apache.

Now I can access from any computer in my LAN to the apache test page with https://homebadajoz.ddns.net without problems; but from the internet it is not possible, the browser stops and ends up presenting the error ERR_CONNECTION_TIMED_OUT.

Hi @juanp, and welcome to the LE community forum :slight_smile:

You may need to open the HTTPS path to your server.
That may mean different things depending on the equipment along the way.

  • there could be a home/residential router that may need port forwarding enabled for port 443
    [ensure 443 goes to 443 - not 433 - not 4443 - not 8443 ...]
    [ensure the IP for 443 is the same as the IP for 80]
  • there could be other "firewalling devices" along the way
  • there could be an IPS involved
  • there could be a proxy involved
  • there could be aliens involved [LOL]

All I know is that I can't reach it from the Internet either:

curl -Ii https://homebadajoz.ddns.net/
curl: (28) Failed to connect to homebadajoz.ddns.net port 443 after 130328 ms: Connection timed out
3 Likes

It is probably one of the things that @rg305 already mentioned (except aliens :slight_smile: )

But, it is possible your ISP blocks port 443. It would be unusual for them to allow port 80 and block 443 but if you don't find a problem in your router or similar it would be worth checking with them.

3 Likes

Thank you for your comments.

I finally checked the log on my home route and found that it is denying access to requests on port 443, although the firewall does not indicate this. The IPS says it is doing this for security reasons and I understand that, but it could be clearly indicated on the firewall.

I redirected an arbitrary port to port 443 on the raspberry-pi and now it works correctly, the URL is not very aesthetic but it serves its purpose.

By the way, looking at the "3 Body Problem", you should not rule out that aliens might be involved [LOL].

2 Likes