> /ip/dns/print
servers:
dynamic-servers:
use-doh-server: https://1.1.1.1/dns-query
verify-doh-cert: yes
doh-max-server-connections: 5
doh-max-concurrent-queries: 50
doh-timeout: 5s
allow-remote-requests: yes
max-udp-packet-size: 4096
query-server-timeout: 2s
query-total-timeout: 10s
max-concurrent-queries: 100
max-concurrent-tcp-sessions: 20
cache-size: 2048KiB
cache-max-ttl: 1w
address-list-extra-time: 0s
cache-used: 104KiB
/certificate/print;
/certificate remove [ find ];
/certificate import file-name=DigiCertGlobalRootG2.crt.pem passphrase="";
/certificate/print;
Are there alternative and more permanent solutions that you can recommend?
That certificate has been abandoned (Cessation Of Operation)
Yes, it seems that the error is related to the certificate. Cloudflare has deprecated the DigiCert root certificate, and this might be causing the issue you're experiencing.Hi, folks
So does it mean, that this error comes from the Certificate side?
And my attached "sert.jpg" is not accepted as valid anymore? It's written, that it's valid for 9131 days.
/ip dns
set allow-remote-requests=yes doh-max-concurrent-queries=100 \
doh-max-server-connections=20 doh-timeout=6s servers=1.1.1.1,1.0.0.1 \
use-doh-server=https://1.1.1.1/dns-query verify-doh-cert=yes
I call upon moderation to redact the offending link to avoid any users reaching for the solution in the wrong direction.NEVER get certificates from 3rd parties, downloading stuff like this from anonymous user google drive is very dangerous.
@normis Apologies! I'll never post a link to g-drive or any files going forward. Sincerely apologize for this.NEVER get certificates from 3rd parties, downloading stuff like this from anonymous user google drive is very dangerous.
Do what the DNS documentation tells you to do. Go to the address you configured as your DoH address and download certificate from your browser, by clicking on the padlock icon
https://help.mikrotik.com/docs/display/ ... HTTPS(DoH)
@01K It's not a work around. It's also one single command. You have to upload the certificates (3 of them) to Mikrotik first. Then import them in Mikrotik certificates. After that's done, run the command. To verify that you are using DoH, go to their website https://1.1.1.1/help. On this page, it'll tell you if you're using DoH, TLS, or just standard Cloudflare.Pardon me, thisis complicated for me to understand
So, basically the workaround is to run these commands one by-one from this thread:Code: Select all/ip dns set allow-remote-requests=yes doh-max-concurrent-queries=100 \ doh-max-server-connections=20 doh-timeout=6s servers=1.1.1.1,1.0.0.1 \ use-doh-server=https://1.1.1.1/dns-query verify-doh-cert=yes
Agree 100% with this statement. I use an alt DNS, Cleanbrowsing. They offer malware, virus, etc protection & DoH as well. I see/know a lot of people use OpenDNS, which the response time isn't as good as Cloudflare, Google or CleanbrowsingThe situation is simple:
Cloudflare updates the https certificate every 2 years (last time done on 30 Dec 2023).
This time DigiCert did not sign the certificate with the old key, but with the new one, so the root certificate is no longer valid.
So probably every 2 years or less (it can happen at any time, but in any case within 21 Jan 2025) the root certificate in the device must be updated.
The solution? Browsers update often, and the root keys are also updated with OS update...
So RouterOS should also implement an additional package with the list of trusted root certificates...
I warn you in advance:
Don't base everything on 1.1.1.1 or similar...
Sooner or later you will get fu–d in the a–...
For example:
They break down for some reason (either by sudden failure, unexpected maintenance, choice, or because they want you to pay fees...)
[Or they are simply fed up with all the useless pings they receive, since they give the DNS service, not the ping service...]
and 1.1.1.1 is unreachable everywhere...
Do you know how many "route"s are changed by mistake, devices that restart with the netwatch, DNS and DoH that no longer work... etc. etc. etc.
Dear @normis,NEVER get certificates from 3rd parties, downloading stuff like this from anonymous user google drive is very dangerous.
Do what the DNS documentation tells you to do. Go to the address you configured as your DoH address and download certificate from your browser, by clicking on the padlock icon
https://help.mikrotik.com/docs/display/ ... HTTPS(DoH)
See this post from Cloudflare community and prepare for the inevitable CA change to SSL.com - https://community.cloudflare.com/t/cert ... doh/600179
I've explored some certificates from Google Trust Services and Cloudflare.com, but they didn't seem to work with my settings. Including verified and up-to-date information on obtaining the correct root CA certificates will greatly assist users in configuring DoH securely.
That is not true. Documentation clearly says that you need to go to the address that you will use as DoH address and download the certificate from there. The name of the file that is seen in the example is irrelevant, it is an example only. The described steps are clear.
Dear @normis,
I wanted to bring to your attention that the MikroTik Confluence wiki page about DNS and DoH configuration seems to have outdated information. The page suggests using DigiCertGlobalRootCA.crt.pem
I've explored some certificates from Google Trust Services and Cloudflare.com, but they didn't seem to work with my settings. Including verified and up-to-date information on obtaining the correct root CA certificates will greatly assist users in configuring DoH securely.
Hello @mbovenka,Installing this Google Trust Services Root CA bundle fixed it for me: https://pki.goog/roots.pem
It is here: https://pki.goog/faq/#faq-27
So RouterOS should also implement an additional package with the list of trusted root certificates...
Hello @marsbeetle,See this post from Cloudflare community and prepare for the inevitable CA change to SSL.com - https://community.cloudflare.com/t/cert ... doh/600179
Dear @normis,
Maybe y'all should make a NPK extra-package with just the common Linux/whatever root/intermediate certs inside (like a branding package, but certs). So it can be installed as trusted package, rather than cut-and-paste certs from somewhere.I know, that's why I said, there is nothing automatic you could do to prevent this from happening.
Maybe y'all should make a NPK extra-package with just the common Linux/whatever root/intermediate certs inside
Hello @01K,Hi guys,
thanks to all!
I imported 3 PEM certificates from https://1.1.1.1/help address and everything is working now.
There was no need to run /ip DNS command
I've imported from browser, accessing the https://1.1.1.1/help URL, click on lock, press View Certificates and download them one be one:Hello @01K,Hi guys,
thanks to all!
I imported 3 PEM certificates from https://1.1.1.1/help address and everything is working now.
There was no need to run /ip DNS command
Thank you for updating the community and sharing your solution! It's great to hear that you were able to resolve the issue by importing the PEM certificates from the https://1.1.1.1/help address.
If possible, could you provide the direct links to the PEM certificates you imported? This information can be helpful for users who might be looking for a quick and direct solution. Your assistance is much appreciated!
I'd like to point out, for the benefit of the community, that the DigiCert Global Root G2 certificate is the root certificate, and both 'DigiCert Global G2 TLS RSA SHA256 2020 CA1' and 'cloudflare-dns.com' are intermediate certificates. While this method is a good temporary solution, it's essential to be aware that Cloudflare has announced an upcoming change to SSL.com as the certificate authority.I've imported from browser, accessing the https://1.1.1.1/help URL, click on lock, press View Certificates and download them one be one:
Above, a member wrote about three certificates:All you need is the certificate that you already put in the link in your previous post.
Who said you need to install 3 of them to make it work?
I can install up to 40 of them, but as long as there is the right one among them.
@01K It's not a work around. It's also one single command. You have to upload the certificates (3 of them) to Mikrotik first. Then import them in Mikrotik certificates. After that's done, run the command. To verify that you are using DoH, go to their website https://1.1.1.1/help. On this page, it'll tell you if you're using DoH, TLS, or just standard Cloudflare.
Correct, but if someone have problems or doubt finding it,Don't trust links in forum. Go to 1.1.1.1 yourself and download it yourself.
Above, one member obscure public availabledata on image, so who trust?Above, a member wrote about three certificates:
Indeed, when importing certificates from the browser, there are three displayed: the root certificate, the intermediate certificate, and the public certificate of 1.1.1.1. The key information here is that, for MikroTik routers, you primarily need the root certificate – 'DigiCert Global Root G2.' This is the top-level certificate in the chain and is sufficient for establishing trust.
Above, one member obscure public availabledata on image, so who trust?
Someone who has posted little on the forum, just registered, or someone who has written more and is member from long time?
Installing the three certificates in the PEM chain that you see in the browser actually installs the correct one, the intermediate one, and the public certificate itself of 1.1.1.1
That's why there are three... But the root certificate is only one...
The middle one might be useful, but the final third, no...
the solution is already inside the certificate
(1.3.6.1.5.5.7.48.1) URL=http://ocsp.digicert.com
(1.3.6.1.5.5.7.48.2) URL=http://cacerts.digicert.com/DigiCertGlobalG2TLSRSASHA2562020CA1-1.crt
http://cacerts.digicert.com/DigiCertGlobalG2TLSRSASHA2562020CA1-1.crt
It could be a security flaw to trust the certificate indicated by the site you are connecting to...
Strange that they allow this in certificates...
SSLHOST=1.1.1.1; echo -n | openssl s_client -showcerts -connect $SSLHOST:443 2>/dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > certificate_chain_$SSLHOST.pem; openssl x509 -in certificate_chain_$SSLHOST.pem -text -noout
I previously looked at using openssl like this, but it appears to produce somewhat different results compared to using Chrome or Firefox.Another option: You can also use "openssl" client at Mac/Linux/WSL terminal to both the certificate chain ("openssl s_client -showcerts -connect 1.1.1.1:443").
I confirm @axe3's info.I previously looked at using openssl like this, but it appears to produce somewhat different results compared to using Chrome or Firefox.Another option: You can also use "openssl" client at Mac/Linux/WSL terminal to both the certificate chain ("openssl s_client -showcerts -connect 1.1.1.1:443").
For 1.1.1.1:443 it only gets the public certificate for 1.1.1.1 and the intermediate one, but does not include the root certificate.
Above, one member obscure public availabledata on image, so who trust?Above, a member wrote about three certificates:
Someone who has posted little on the forum, just registered, or someone who has written more and is member from long time?
Installing the three certificates in the PEM chain that you see in the browser actually installs the correct one, the intermediate one, and the public certificate itself of 1.1.1.1
That's why there are three... But the root certificate is only one...
The middle one might be useful, but the final third, no...
"openssl s_client ..." worked on an older Arch, but just test on Mac and Ubuntu... y'all correct, it's not including the needed root. It's still not the best plan here, since the purpose to verify DoH DNS server isn't being spoof... but if you were already spoofed, openssl client get you spoofed certs (albiet unlikely). I just had a command from a web server script, didn't cross-check the results for 1.1.1.1. Clearly you shouldn't trust anyone with the Mario Kart profile pic.The command produces a .pem file containing the public certificate for cloudflare-dns.com and the intermediate certificate DigiCert Global G2 TLS RSA SHA256 2020 CA1. However, it may not include the root certificate, which is crucial for establishing a complete certificate chain.
Yup. And, if you wanted to be extreme through you can diff MT's docs with the copy on the root cert's web site (e.g. DigiCert, SSL.com, etc.).For a comprehensive solution, it's recommended to obtain the root certificate separately. You can do this by visiting the website directly, as suggested by MikroTik support.