Community discussions

MikroTik App
 
User avatar
abbio90
Member
Member
Topic Author
Posts: 470
Joined: Fri Aug 27, 2021 9:16 pm
Location: Oristano
Contact:

renew ssl certificate let's encrypt

Mon Mar 17, 2025 11:43 pm

if i create a certificate with let's encrypt with the command
/certificate/enable-ssl-certificate dns-name=name.ddns.org 
does the renewal happen automatically? I found myself with an expired certificate and the renewal did not happen, do I have to force the renewal with a script?
 
xrlls
Member Candidate
Member Candidate
Posts: 108
Joined: Sun Jan 13, 2019 4:43 pm
Location: Copenhagen, DK

Re: renew ssl certificate let's encrypt

Tue Mar 18, 2025 7:49 am

It does not renew itself automatically, so you will have to script your way out of it. Also please remember to open and close port 80 in the firewall programmatically, as leaving it open is a recipe for disaster :shock:
 
User avatar
abbio90
Member
Member
Topic Author
Posts: 470
Joined: Fri Aug 27, 2021 9:16 pm
Location: Oristano
Contact:

Re: renew ssl certificate let's encrypt

Tue Mar 18, 2025 10:37 am

is it worth making a script that checks every day and when there is one day left to expire removes the certificate and replaces it by rebinding it to the hotspot and in ip service?
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 27079
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: renew ssl certificate let's encrypt

Tue Mar 18, 2025 10:39 am

No need to script, the renewal is built in as described here:
https://help.mikrotik.com/docs/spaces/R ... rtificates
 
User avatar
infabo
Forum Guru
Forum Guru
Posts: 1697
Joined: Thu Nov 12, 2020 12:07 pm

Re: renew ssl certificate let's encrypt

Tue Mar 18, 2025 10:48 am

The last time I created a LE certificate by
/certificate/enable-ssl-certificate type=cloud-dns
it worked. This was somewhen in dec/24. Certifcate expired beginning of march/25 IIRC and was never renewed automatically. I found out by visiting webfig and saw the SSL warning and cert-info said it was expired. But no matter what I tried, I was not able to renew the certificate. Then I removed the certificate so I thought it would work by starting from scratch. But not working either. I reported to MT support but got in response: you must open port 80. Well, the selling point about cloud dns challenge is: no need to open port 80.
 
User avatar
abbio90
Member
Member
Topic Author
Posts: 470
Joined: Fri Aug 27, 2021 9:16 pm
Location: Oristano
Contact:

Re: renew ssl certificate let's encrypt

Tue Mar 18, 2025 10:59 am

No need to script, the renewal is built in as described here:
https://help.mikrotik.com/docs/spaces/R ... rtificates
to make it renew automatically, do I have to configure the scep server part? The help in question regarding renewal is not very detailed
 
xrlls
Member Candidate
Member Candidate
Posts: 108
Joined: Sun Jan 13, 2019 4:43 pm
Location: Copenhagen, DK

Re: renew ssl certificate let's encrypt

Tue Mar 18, 2025 11:58 am

I have the same experience as @infabo, but it might be because I am not willing to leave port 80 open. As MT support suggested @infabo.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 27079
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: renew ssl certificate let's encrypt

Tue Mar 18, 2025 1:06 pm

Disable WWW service and then you can safely leave TCP 80 open in the input, it will not pose any risks. Your Webfig anyway will work on WWW-SSL, so it will not be affected.

But there will be a new method soon, that will not require you to even do that.
 
User avatar
Larsa
Forum Guru
Forum Guru
Posts: 1943
Joined: Sat Aug 29, 2015 7:40 pm
Location: The North Pole, Santa's Workshop

Re: renew ssl certificate let's encrypt

Tue Mar 18, 2025 1:13 pm

I thought the whole idea of the Let's Encrypt DNS-01 challenge was that it doesn't require port 80 at all. Have I missed something?
 
User avatar
infabo
Forum Guru
Forum Guru
Posts: 1697
Joined: Thu Nov 12, 2020 12:07 pm

Re: renew ssl certificate let's encrypt

Tue Mar 18, 2025 1:22 pm

It is. And actually worked without port 80 open when I first issued the certificate with type=cloud-dns. This was introduced in 7.16. But maybe is broken now. I dont know.
 
User avatar
abbio90
Member
Member
Topic Author
Posts: 470
Joined: Fri Aug 27, 2021 9:16 pm
Location: Oristano
Contact:

Re: renew ssl certificate let's encrypt

Tue Mar 18, 2025 1:27 pm

Disable WWW service and then you can safely leave TCP 80 open in the input, it will not pose any risks. Your Webfig anyway will work on WWW-SSL, so it will not be affected.

But there will be a new method soon, that will not require you to even do that.
do you have a list of domains or ip used for renewal? it doesn't seem very professional to expose the port to everyone unless there is a service exposed on it.
 
User avatar
Larsa
Forum Guru
Forum Guru
Posts: 1943
Joined: Sat Aug 29, 2015 7:40 pm
Location: The North Pole, Santa's Workshop

Re: renew ssl certificate let's encrypt

Tue Mar 18, 2025 2:09 pm

It is. And actually worked without port 80 open when I first issued the certificate with type=cloud-dns. This was introduced in 7.16. But maybe is broken now. I dont know.

Yeah, sounds like a bug to me. Maybe someone should open a ticket or mail "support@mikrotik.com" about it.
 
User avatar
infabo
Forum Guru
Forum Guru
Posts: 1697
Joined: Thu Nov 12, 2020 12:07 pm

Re: renew ssl certificate let's encrypt

Tue Mar 18, 2025 3:09 pm

Mikrotik support acknowledged the issue today.
The issue has been reproduced, we look forward to fixing it in upcoming RouterOS versions.

Currently, the provided type is ignored and http-01 challenge is used.
 
User avatar
Larsa
Forum Guru
Forum Guru
Posts: 1943
Joined: Sat Aug 29, 2015 7:40 pm
Location: The North Pole, Santa's Workshop

Re: renew ssl certificate let's encrypt

Tue Mar 18, 2025 6:53 pm

Thanks for the feedback!

Anyone know if it's only web-wwl that works with automatic renewal of LE certificates using the DNS-01 challenge, or if it will also work for IPsec and cloud domains (ie, "type=cloud-dns")?
 
pe1chl
Forum Guru
Forum Guru
Posts: 10650
Joined: Mon Jun 08, 2015 12:09 pm

Re: renew ssl certificate let's encrypt

Tue Mar 18, 2025 8:56 pm

do you have a list of domains or ip used for renewal? it doesn't seem very professional to expose the port to everyone unless there is a service exposed on it.
There is no published list of IP addresses used for renewal. There is some document that says they don't publish it to reduce the risk of man-in-the-middle attacks.

I tried to put them in a list but they are changing all the time.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 13091
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: renew ssl certificate let's encrypt

Tue Mar 18, 2025 9:13 pm

do you have a list of domains or ip used for renewal? it doesn't seem very professional to expose the port to everyone unless there is a service exposed on it.

Il servizio non è fornito dalla MikroTik, quindi rivolgiti a Let's Encrypt per la lista... se te la danno.
[The service is not provided by MikroTik, so contact Let's Encrypt for the list... if they give it to you.]

https://letsencrypt.org/docs/faq/#what- ... web-server