Certbot renew and firewall


#1

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.


#2

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.


#3

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