My domain is: darkvirtue.com
I ran this command:
certbot renew --renew-hook 'cat $RENEWED_LINEAGE/privkey.pem $RENEWED_LINEAGE/fullchain.pem > $RENEWED_LINEAGE/longpem.pem' --post-hook '/bin/systemctl reload haproxy dovecot postfix'
My /etc/letsencrypt/cli.ini
is
email = admin@darkvirtue.com
authenticator = standalone
http-01-address = 127.0.0.1
http-01-port = 10443
rsa-key-size = 4096
non-interactive = True
text = True
keep-until-expiring = True
expand = True
agree-tos = True
max-log-backups = 10
It produced this output:
<snip>
Certbot failed to authenticate some domains (authenticator: standalone). The Certificate Authority reported these problems:
Domain: books.darkvirtue.com
Type: connection
Detail: 156.96.60.101: Fetching http://books.darkvirtue.com/.well-known/acme-challenge/UGafM1fxlZybxH99tLqepPTNOtZoYmdAWnrJL7cgG4M: Timeout during connect (likely firewall problem)
<snip>
Hint: The Certificate Authority failed to download the challenge files from the temporary standalone webserver started by Certbot on 127.0.0.1:10443. Ensure that the listed domains point to this machine and that it can accept inbound connections from the internet.
My reverse proxy is: HAProxy 2.2.9
Relevant parts of haproxy.cfg
:
frontend http-virtual
bind :::80
bind *:80
bind :::443 ssl crt /etc/haproxy/certs/ alpn h2,http/1.1
bind *:443 ssl crt /etc/haproxy/certs/ alpn h2,http/1.1
acl letsencrypt path_beg -i /.well-known/acme-challenge
redirect scheme https code 301 if !{ ssl_fc }
use_backend letsencrypt if letsencrypt
backend letsencrypt
server certbot 127.0.0.1:10443
The operating system my web server runs on is (include version): Debian 11.5
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): 2.0.0
HAProxy appears to be correctly routing all request for /.well-known/acme-challenge to 127.0.0.1:10443. Likewise, Certbot is correctly listening on 127.0.0.1:10443. I verified by trying to request the HEAD while Certbot is running from an external server:
curl -I https://books.darkvirtue.com/.well-known/acme-challenge/
HTTP/2 501
date: Tue, 06 Dec 2022 18:42:47 GMT
content-type: text/html;charset=utf-8
content-length: 497
strict-transport-security: max-age=31536000; preload; includeSubDomains
x-frame-options: SAMEORIGIN
x-xss-protection: 1;mode=block
referrer-policy: no-referrer,same-origin,strict-origin,strict-origin-when-cross-origin
x-content-type-options: nosniff
While Certbot isn't running, I get the expected 503 error.
I've had this configuration in place for several years and it's been fine until today. Could anyone provide some insight as to why the Acme challenges are timing out? The firewall is clearly not the issue.