I'd like to programmatically enable and disable port forwarding on my router (use case below).
It should be straightforward enough to write the IPTables rules, but I'm not sure what event (if any) I can use as a trigger. Is updating the nat-start script and rebooting the router the best option here or are there other (less kludgy) approaches I might take?
Use Case: As part of the Let's Encrypt project, SSL certificate issuance and renewal is automated but requires that the requesting domain be reachable. My domain typically resides behind my router and is not reachable from the public internet for a domain validation challenge. Since certificates are relatively short-lived, renewal automation is encouraged. So, I'd like to be able to programmatically open and close the relevant ports in Merlin as part of my renewal scripts.
It should be straightforward enough to write the IPTables rules, but I'm not sure what event (if any) I can use as a trigger. Is updating the nat-start script and rebooting the router the best option here or are there other (less kludgy) approaches I might take?
Use Case: As part of the Let's Encrypt project, SSL certificate issuance and renewal is automated but requires that the requesting domain be reachable. My domain typically resides behind my router and is not reachable from the public internet for a domain validation challenge. Since certificates are relatively short-lived, renewal automation is encouraged. So, I'd like to be able to programmatically open and close the relevant ports in Merlin as part of my renewal scripts.