I was expecting that the certificate generated by the command below would be renewed automatically, but that hasn’t happened. Mine has just expired and I do not see any signs of incoming connections to port 80. The www and www-ssl IP services are running and port 80 is open for Let’s Encrypt hosts:
The /certificate enable-ssl-certificate command removed previously generated certificate and imported a new one. To automate this I’ve created a script and set it to run every 90 days in the scheduler. Thank you!
/ip service enable www;
/ip firewall filter enable [find comment=letsencrypt];
/log info "Let's Encrypt certificate renewal started";
/certificate enable-ssl-certificate dns-name=<removed>.ddns.net;
/ip service disable www;
/ip firewall filter disable [find comment=letsencrypt];
/log info "Let's Encrypt certificate renewal completed";
And the firewall rule:
> /ip/firewall/filter/print where comment=letsencrypt
Flags: X - disabled, I - invalid; D - dynamic
0 X ;;; letsencrypt
chain=input action=accept protocol=tcp in-interface-list=WAN dst-port=80 log=yes log-prefix=""
Where can I find documentation about enable-ssl-certificate’s options? I need to set it to use staging server to debug my script without running into rate limit.
I followed MikroTik’s video instructions where they suggested creating an address list and using it in a firewall rule for port 80.
That didn’t work for me, so I removed the address list, created a script that opens the port just before the certificate renewal and closes immediately after, and set it to run every 90 days.
Those are generic options that you may find in almost every print command. See the “print parameters” at the scripting help page. They have nothing to do with certificates or Let’s Encrypt.