Community discussions

MikroTik App
 
alphalt
Member Candidate
Member Candidate
Topic Author
Posts: 120
Joined: Sat Aug 01, 2009 1:53 pm
Location: Denmark

DoH certificate handshake failed (Quad9)

Thu Jul 25, 2024 6:57 pm

Hi,

Today, all of the sudden, without doing any changes to Mikrotik, I lost internet connection. After some investigation I've found this fault message:
DoH server connection error: SSL: handshake failed: unable to get local issuer certificate (6)
I know that there are tons of forum entries about this topic. I just wanted to ask if there is somebody else using QUAD9 DoH servers and can confirm that problem exists. I do not know whether it is problem at Mikrotik side (I doubt as I did not make any changes nor updates) or something is really wrong with Quad9 certificates.

The only way to workaround this issues is to remove tick mark from Verify DoH Certificate. Then it works. For safety reasons I went back to ISP DNS servers until I find out what is going on.

Would appreciate any help or ideas what to check.

Regards
 
erlinden
Forum Guru
Forum Guru
Posts: 2689
Joined: Wed Jun 12, 2013 1:59 pm
Location: Netherlands

Re: DoH certificate handshake failed (Quad9)

Thu Jul 25, 2024 7:10 pm

If you want to check "Verify DoH Certificate" (which you obviously do), you hwave to make sure the MikroTik has the Root CA installed.

Check this blog that explains the steps to get it to work:
https://www.shellhacks.com/mikrotik-dns ... loudflare/
 
alphalt
Member Candidate
Member Candidate
Topic Author
Posts: 120
Joined: Sat Aug 01, 2009 1:53 pm
Location: Denmark

Re: DoH certificate handshake failed (Quad9)

Thu Jul 25, 2024 7:25 pm

Thanks for reply.

As I said, everything was working without any issues until today, this is not new setup. It was fully working setup until it stopped all of the sudden today. And yes, I have already had Root CA certificate, but it was a bit different than in the post you mentioned. I was using this one:
https://cacerts.digicert.com/DigiCertGlobalRootCA.crt.pem
 
erlinden
Forum Guru
Forum Guru
Posts: 2689
Joined: Wed Jun 12, 2013 1:59 pm
Location: Netherlands

Re: DoH certificate handshake failed (Quad9)

Thu Jul 25, 2024 7:33 pm

Could it be that the imported certificate is expired or renewed?
 
alphalt
Member Candidate
Member Candidate
Topic Author
Posts: 120
Joined: Sat Aug 01, 2009 1:53 pm
Location: Denmark

Re: DoH certificate handshake failed (Quad9)

Thu Jul 25, 2024 10:37 pm

I thought about that. Certificate is valid until 2031 and I have also downloaded new version in case it was renewed. Still same issue. I have also checked date and time on router and it is ok.

It is strange as it happened all of the sudden. Internet was just gone without doing anything.

If Root CA is used by Mikrotik to validate DoH certificate, could it be problem then on Mikrotik side? Anyone else using this:
DigiCertGlobalRootCA.crt.pem
Do you experience any issues?
 
RichNZ
just joined
Posts: 1
Joined: Thu May 09, 2024 6:58 am

Re: DoH certificate handshake failed (Quad9)

Thu Jul 25, 2024 11:41 pm

Quad9 have replaced their root. You need the new cert.
https://www.reddit.com/r/Quad9/comments ... ices_must/
 
macropin
just joined
Posts: 8
Joined: Thu Sep 25, 2014 1:05 pm

Re: DoH certificate handshake failed (Quad9)

Fri Jul 26, 2024 12:47 am

The validation chain changed. DigiCert switched roots, as the CA certificate fingerprints don't match. They're now using "DigiCert Global Root G3". Import DigiCertGlobalRootG3.crt.pem from https://www.digicert.com/kb/digicert-ro ... icates.htm and it will fix the issue.
 
alphalt
Member Candidate
Member Candidate
Topic Author
Posts: 120
Joined: Sat Aug 01, 2009 1:53 pm
Location: Denmark

Re: DoH certificate handshake failed (Quad9)

Fri Jul 26, 2024 4:44 pm

Thank you for your help, it have resolved my issue.

Funny enough, if I download certificate as it is suggested directly at Quad9 website
/tool/fetch mode=https url="https://cacerts.digicert.com/DigiCertGlobalG3TLSECCSHA3842020CA1-1.crt.pem"
then issue is still there. If I download DigiCertGlobalRootG3.crt.pem direclty from https://www.digicert.com/kb/digicert-ro ... icates.htm as suggested by macropin, then all works like a charm. It is a bit strange that Quad9 guys have link to wrong certificate in their description.

Anyway, it works now. Thanks a lot.
 
nacardin
just joined
Posts: 1
Joined: Fri Oct 11, 2024 7:03 pm

Re: DoH certificate handshake failed (Quad9)

Fri Oct 11, 2024 7:08 pm

Thank you for your help, it have resolved my issue.

Funny enough, if I download certificate as it is suggested directly at Quad9 website
/tool/fetch mode=https url="https://cacerts.digicert.com/DigiCertGlobalG3TLSECCSHA3842020CA1-1.crt.pem"
then issue is still there. If I download DigiCertGlobalRootG3.crt.pem direclty from https://www.digicert.com/kb/digicert-ro ... icates.htm as suggested by macropin, then all works like a charm. It is a bit strange that Quad9 guys have link to wrong certificate in their description.

Anyway, it works now. Thanks a lot.
Thanks! On RouterOS 7.11.2, DigiCertGlobalRootG3.crt.pem works for me. DigiCertGlobalG3TLSECCSHA3842020CA1-1.crt.pem does not load:
certificates-imported: 0
private-keys-imported: 0
files-imported: 0
decryption-failures: 0
keys-with-no-certificate: 0