Enable and disable rule through external script

Started by Guybrush, November 01, 2020, 06:10:16 PM

Previous topic - Next topic
Greetings,

I am currently running a Nextcloud Instance with LetsEncrypt certificated. Nextcloud is only availabe to a group of static IP addresses. The only problem here is that I need to open 80 and 443 to the world to renew my certificates.

I could do it manually, but idealy want to run a script on the Nextcloud server, that enabled that particular rule, executes the certificate renewal, and disables the rule again.

Is that something I can accomplish? This scenario would come handy also in many other cases I assume.

Thanks
Guybrush

Quote from: Guybrush on November 01, 2020, 06:10:16 PM
The only problem here is that I need to open 80 and 443 to the world to renew my certificates.

I ran into the same problem and fixed it with a separate host that downloads the letsencrypt certificate(s) using dehydrated and then distributes them to all the servers using the certificates. I use the DNS method for dehydrated but you can also use HTTP

https://github.com/bartsmit/distcerts

Bart...