Nginx on home server

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: www.adviner.org

I ran this command as root: certbot --nginx

It produced this output:

Requesting a certificate for www.adviner.org

Certbot failed to authenticate some domains (authenticator: nginx). The Certificate Authority reported these problems:
Domain: www.adviner.org
Type: connection
Detail: 47.216.6.177: Fetching http://www.adviner.org/.well-known/acme-challenge/H....: 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.

Some challenges have failed.
Ask for help or search for solutions at https://community.letsencrypt.org.
My web server is (include version): nginx

The operating system my web server runs on is (include version): debain 11

My hosting provider, if applicable, is: I'm hosting on my home server. My domain is being redirected by sitelutions to my wan ip

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 only command line

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): certbot 1.32.0

Hello @adivner, welcome to the Let's Encrypt community. :slightly_smiling_face:

Best Practice - Keep Port 80 Open

With nmap Port 80 (HTTP) is not showing and Port 443 (HTTPS) is closed.

$ nmap www.adviner.org
Starting Nmap 7.80 ( https://nmap.org ) at 2022-11-25 21:12 UTC
Nmap scan report for www.adviner.org (47.216.6.177)
Host is up (0.053s latency).
Not shown: 994 filtered ports
PORT     STATE  SERVICE
22/tcp   open   ssh
443/tcp  closed https
2222/tcp open   EtherNetIP-1
4443/tcp open   pharos
8081/tcp closed blackice-icecap
9000/tcp closed cslistener

Nmap done: 1 IP address (1 host up) scanned in 5.44 seconds

Thus causing this failure.

Online tools to help check https://letsdebug.net/ and https://check-host.net/
Permanent results link Let's Debug
Permanent results link Check report was removed: Check host - online website monitoring

1 Like

...and to give a little more context: In order to get a cert from Let's Encrypt (or anyone else, really), you must complete a challenge to prove control over the domain. There are three types of challenge available; the one used with the --nginx plugin requires that port 80 be open from the Internet to whatever system you're running certbot on. Bruce is pointing out that this isn't the case, which is why cert issuance is failing. Your options are to either open port 80, or use a different challenge type. For more on those, see:

3 Likes

So I installed a self signed certificate so I can have SSL working. And now I run nmap:

Starting Nmap 7.92 ( https://nmap.org ) at 2022-11-25 16:32 EST
Nmap scan report for www.adviner.org (47.216.6.177)
Host is up (0.079s latency).
Not shown: 97 filtered tcp ports (no-response)
PORT STATE SERVICE
80/tcp open http
443/tcp open https
Nmap done: 1 IP address (1 host up) scanned in 2.85 seconds

but when I run the command: certbot -v --nginx --staging -d www.adviner.org
I get the same error

Thats odd cause I have port 80 and 443 open and can be verified by HTTP://www.adviner.org and https://www.adviner.org

This is what I am seeing from my location presently; no Port 80

$ nmap www.adviner.org
Starting Nmap 7.80 ( https://nmap.org ) at 2022-11-25 21:35 UTC
Nmap scan report for www.adviner.org (47.216.6.177)
Host is up (0.055s latency).
Not shown: 994 filtered ports
PORT     STATE  SERVICE
22/tcp   open   ssh
443/tcp  open   https
2222/tcp open   EtherNetIP-1
4443/tcp open   pharos
8081/tcp closed blackice-icecap
9000/tcp closed cslistener

Nmap done: 1 IP address (1 host up) scanned in 5.64 seconds
1 Like

Could this be blocked my provider - Suddenlink? Even though I can get to the site

2 Likes

And https://letsdebug.net/ is still showing Let's Debug

1 Like

Yes, a definite possibility.
Check their support links.

1 Like

OK, from Suddenlink they block port 80. Is there a possibility to use a different port with Certbot like 8080 for example?

2 Likes

It's very common for residential ISPs in .us to block port 80. Your site is accessible via HTTPS, just not via HTTP. This means that you might look at an alternative client that implements the TLS-ALPN challenge to get a cert. It still isn't ideal--you'd still want port 80 open if you're going to run a website--but it'd be much better than nothing.

Not using the HTTP challenge; it must connect on port 80 (it can then follow a redirect to HTTPS/443, but it must first connect on port 80). But you can use a different challenge--see above and the link I posted up-topic.

4 Likes

Bummer, ok thank you for all the quick response and the helpful information

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.