So part of the problem is that the ACME servers come from a wide range of places. You're going to need to modify the certbot bash script so that is opens up the web ports to the whole internet, renews the cert, then closes the port. I'll work on modifying the certbot script so that it does this in the future.
In the mean-time, as a workaround, you would want to either create a bash script or modify the crontab so that it opens port 80 to the internet before running certbot and closes it after. Here's what that bash script would look like:
- Code: Select all
#!/bin/bash
firewall-cmd --zone=public --add-service=http
/usr/bin/certbot -n --webroot renew >/dev/null 2>&1
firewall-cmd --zone=public --remove-service=http
You would then run this bash script in place of the certbot entry in the crontab.
You could also just put the firewall-cmd lines above in the actual crontab. You'd just put the first one before certbot and the second after after certbot in the cron just like how they're listed.