Hi,
I’m trying to set up a web server on my Raspberry pi at home. I’ve used duckdns for dynamic domain name service.
I know that I’ve got my router’s port forwarding set up correctly because my website works on both port 80 and port 443 at the domain name I’ve set up. I currently have a self-signed certificate instead of a signed letsencrypt one. Certbot claims that I keep failing challenges, what am I doing wrong?
The standalone specific supported challenges flag is deprecated. Please use the --preferred-challenges flag instead.
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator standalone, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for volumeup.duckdns.org
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. volumeup.duckdns.org (http-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching http://volumeup.duckdns.org/.well-known/acme-challenge/VAXOGZXNQ9_5y5UVL6SUW0fMkK__-ls2E7u5lnNXYoA: 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.
My web server is (include version):
A custom server I wrote in go (source available if requested)
The operating system my web server runs on is (include version):
Raspbian Stretch
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
@chickenofdoom in case you missed it my previous post had an error which I have now corrected, sorry. I mixed up the two scripts so if you copied and pasted them please do so again
Port 443 is no longer generally available for validation for new certificates, due to a security issue. You can redirect from 80 to 443, but you must be able to answer on 80 first. The only other option is the DNS challenge.
I am trying to access my raspberrypi 3B from the internet.
For that I was following this instructions but when trying to generate the certificate I get the error:
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for myexample.duckdns.org
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. myexample.duckdns.org (http-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching http://myexample.duckdns.org/.well-known/acme-challenge/LM7F.....: Timeout
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: myexample.duckdns.org
Type: connection
Detail: Fetching
http://myexample.duckdns.org/.well-known/acme-challenge/LM7FnA.....:
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.
Then, if I follow the recipe shared in here, I get the certificates generated but anyway I cannot connect to my raspberrypi from the internet.
I have also notice that it does not matter at all the port forwarding configuration of my modem. Using the commands from here, and deleting completely all my port forwarding sets, I can still generate the SSL certificate. How is that possible?
The raspberry pi is running a clean installation of Raspbian with a clean installation of home assistant (this instructions)
The method described above uses the DNS API of Duck DNS, so the validation looks for a DNS TXT record to verify your control of the (sub)domain and does not need to connect to your server at all.
Some home ISPs do block some ports from being accessed from the internet. If your ISP is blocking both 80 and 443, you might try forwarding an alternative port such as 8443 to your raspberry pi.