Timeout during connect (likely firewall problem) but ports are open

My domain is:
megasweden.se, nabaxo.dev, nabaxo.io and a few more

I ran this command:
sudo certbot --nginx -v

It produced this output:

Renewing an existing certificate for nabaxo.asuscomm.com and 16 more domains
Performing the following challenges:
...
http-01 challenge for www.megasweden.se
...
Challenge failed for domain www.megasweden.se
...
http-01 challenge for www.megasweden.se
...
  Domain: www.megasweden.se
  Type:   connection
  Detail: 155.4.192.55: Fetching http://www.megasweden.se/.well-known/acme-challenge/dzmFLIRBpcCegrUhY-Fes0U5tamQRBKkLMxOR6IYA_E: Timeout during connect (likely firewall problem)
...
Hint: The Certificate Authority failed to verify the temporary nginx configuration changes made by Certbot. Ensure the listed domains point to this nginx server and that it is accessible from the internet.

Cleaning up challenges
Some challenges have failed.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

The "..." is just duplicate entries with other domain names.

My web server is (include version):
nginx/1.22.1

The operating system my web server runs on is (include version):
Raspbian 12

My hosting provider, if applicable, is:
n/a

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 (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):
certbot 3.1.0

So, when I check with a port scanner, it says ports 80 and 443 are open, but when I check with letsdebug.net, it gives me an error. I have no idea what's going on.

How did you check this exactly?

Because from my point of view nothing is open to the public internet and this is corroborated by websites like https://check-host.net/check-http?host=www.megasweden.se for most locations. Only two sites (France and Switzerland) seem to be able to connect.

Any geo blocking going on perhaps?

Edit:
Weird, if I run that tool a second time, just two other countries show up, but Switzerland is gone. Some weird firewall you have. It's different every time.

1 Like

It's super weird, right? When I check my actual IP: Port Checker - Check Open Ports Online

It's fine...

Not when I run it. Only port 8443 was open when I checked the Server ports.

Edit: and of course a second time port 80 and 443 are open. But a third time they're not.

Please check any firewall for this behaviour or perhaps ask your ISP about it.

4 Likes

Thanks for the help mate!

For future reference, it was my router that decided to turn on DoS protection. :person_facepalming:

2 Likes