Timeout Connection Error - Linux Nextcloud Certbot Let's Encrypt

I’m using a fresh install of Linux 16.04 and Nextcloud 12.0.1

I setup port forwarding with a router so I can type in the ip address on any browser and nextcloud login shows up. But it’s highly recommended to use a secure connection like https. So, I found this tutorial about Let’s Encrypt for Linux - https://certbot.eff.org/#ubuntuxenial-apache

Let’s Encrypt said it needed a domain name and not an ip address so I set up a domain name through my hosting company at pointed the A/AAAA record to the IP Address. I can type that domain name url into any browser and it takes me to the Nextcloud login screen.

BUT after Doing THIS from the Tutorial:

$ sudo apt-get update
$ sudo apt-get install software-properties-common
$ sudo add-apt-repository ppa:certbot/certbot
$ sudo apt-get update
$ sudo apt-get install python-certbot-apache
$ sudo certbot --apache

I KEEP GETTING THIS ERROR MESSAGE (NOTE: the Domain name is changed for security reasons)

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache

Which names would you like to activate HTTPS for?

1: www.EXAMPLE.com
2: EXAMPLE.com

Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter ‘c’ to cancel): 2
Obtaining a new certificate
Performing the following challenges:
tls-sni-01 challenge for EXAMPLE.com
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. EXAMPLE.com (tls-sni-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Timeout

IMPORTANT NOTES:

  • The following errors were reported by the server:

    Domain: EXAMPLE.com
    Type: connection
    Detail: Timeout

    To fix these errors, please make sure that your domain name was
    entered correctly and the DNS A/AAAA record(s) for that domain
    contain(s) the right IP address. Additionally, please check that
    your computer has a publicly routable IP address and that no
    firewalls are preventing the server from communicating with the
    client. If you’re using the webroot plugin, you should also verify
    that you are serving files from the webroot path you provided.

So basically Let’s Encrypt via Certbox timesout but if I type in the domain into a browser it works just fine. (I does say something about the domain is not trusted and to verify it.)

I did try several different thing after looking through forums online but nothing works so I decided to post the issue here.

In the DNS A/AAAA records at the hosting company I only pointed the IPv4 IP Address to the one I setup on my server / router box but I didn’t do anything with the IPv6 because I didn’t set one up on the server. Not sure it that is the issue or not.

If you have an AAAA record but you don’t have IPv6 working, then that is definitely the issue (or at least part of the issue). Remove the AAAA record. You can add it back in later when you have IPv6 working correctly on your server.

If that doesn’t help, check that you don’t have a firewall or anything similar blocking access to port 443.

My best guess is that you forwarded port 80, but forgot to forward port 443. The Apache plugin uses challenges over port 443 (the https port, so you’ll want to open this anyway.)

Without your real domain, though, we’re just stabbing in the dark. The message you were shown when you created this post describes the reasons that withholding this information doesn’t increase secrecy, but rather only makes it harder for others to help you. To re-emphasize that, once you issue a certificate, your domain name will be permanently and publicly logged in the certificate transparency logs, which anyone or anything can read manually or programmatically.

Hi Jmorahan & Jared.M,

I added port 443 to port forwarding.

And I had Ubuntu Manage the Network Interface.

Between the two I got the let’s encrypt / certbot to issue a certificate.

Thank for all the Help!

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