I really appreciate the inclusion of LetsEncrypt certificates. I have been playing with them, but I have run into a significant problem.
It appears that to obtain or renew a certificate, the process requires an open port 80. Not just that, but specifically you have to enable Webfig on port 80. Which contains everything needed for any tom dick or harry to fingerprint the device as a Mikrotik and what OS I am running. Not to mention the fact that this allows an attacker to see if they can guess my password. While having a valid cert is a great thing and enables several vpn options, we should not have to expose our firewall ports to the general internet to do so.
Normal firewall practice is that these ports are NOT open to the general internet. In addition, many people will have port 80 open and NATed for a internal Webserver.
LetsEncrypt allows the for DNS-01 validation if you want to use custom domains. The Mikrotik allows for us to request a cert using a custom domain if the domain validation is turned on and active. (Please be careful with this. I use a throwaway DNS domain that is specifically used for my Mikrotik. I set my DNS domain so I could do this securely. Please be careful.) What I am looking for is the Mikrotik equivalent of this command:
sudo certbot certonly --manual --manual-auth-hook /etc/letsencrypt/acme-dns-auth.py --preferred-challenges dns --debug-challenges -d subdomain.your-domain
This would allow those of us with custom domains to get certs issued without having to open ports. Alternatively, giving us control over the renewal and dry-run processes would be very helpful.
A workaround I figured out from testing is to run a script like this: But this is clunky, and still requires the use of a non natted port 80.
/ip service
set www disabled=no
/certificate
enable-ssl-certificate dns-name=$urlvariable
/ip service
set www enabled=yes