My domain is: cleo4.ddns.net
I ran this command: Renewal script for cerbot.
It produced this output:
Certbot failed to authenticate some domains (authenticator: webroot). The Certificate Authority reported these problems:
Identifier: cleo4.ddns.net
Type: connection
Detail: xxx.xxx.xxx.x: Fetching http://cleo4.ddns.net/.well-known/acme-challenge/WHVNGCMuBBYGX7weHkWkvTdyicQVza9KQzTxLYzomgA: Timeout during connect (likely firewall problem)
Hint: The Certificate Authority failed to download the temporary challenge files created by Certbot. Ensure that the listed identifiers serve their content from the provided --webroot-path/-w and that files created there can be downloaded from the internet.
Failed to renew certificate cleo4.ddns.net with error: Some challenges have failed.
My web server is (include version): Apache2 v 2.4.52
The operating system my web server runs on is (include version): Kubuntu 22.04
My hosting provider, if applicable, is: NoIp for dns, self hosted.
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 5.6.0
NOTES:
Port forwarding and firewall open for port 80. I think the issue might lie in my virtualhost configuration. Running curl on port 80 for my server address times out. Virtualhost config is redirecting all traffic to https. I'm trying to allow the acme challenge to be the exception, but I'm not getting it right. Forgive me as I'm fairly inexperienced when it comes to troubleshooting.
Here is my virtualhost config. You'll see I have a half cooked attempt to allow the acme challenge in the RewriteEngine section:
<VirtualHost *:80>
ServerName cleo4.ddns.net
Redirect permanent / https://cleo4.ddns.net
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =cleo4.ddns.net
#Exclude Acme Challenge from HTTPS redirect.
RewriteCond %{REQUEST_URI} !^/\.well\-known/acme\-challenge/
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
#Setup for Acme Challenge for Renewals.
Alias /.well-known/acme-challenge/ /var/www/letsencrypt/.well-known/acme-challenge/
<Directory "/var/www/letsencrypt/.well-known/acme-challenge/">
Options None
AllowOverride None
ForceType text/plain
RedirectMatch 404 "^(?!/\.well-known/acme-challenge/[\w-]{43}$)"
</Directory>
</VirtualHost>
<VirtualHost *:443>
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
</VirtualHost>