Certbot renew and firewall

Is there a way on Centos to turn the firewall off on ports 80 and 443, run “certbot renew” and then turn the firewall back on? Has anyone done this? I have a system I want an SSL certificate on but for the most part only want to give access to certain IP pools.

That depnds slightly on the firewall, but you can use the -pre-hook --post-hook commands

certbot renew --pre-hook “service firewall stop” --post-hook “service firewall start”

where the “service firewall stop” is the command to stop your firewall.

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