Community discussions

MikroTik App
 
mtf
just joined
Topic Author
Posts: 6
Joined: Mon Dec 12, 2022 12:23 am

Mikrotik router and the DoH cache server cannot connect to internet when using double WAN and route-mark toghether

Mon Dec 12, 2022 1:02 am

Hello thanks for your time ,I have some serious issues with DoH and internet of the mikrotik device it self ...

1) When using two Wan connections on two different networks , mikrotik's DNS and internet connection will be locked out , actually when using (routing-mark) option on (/ip/route) if I disable even one of the routing-mark options ,the router will be connected to internet and the DNS cache server will work no problem. here is the thing I want to use the router as DNS Cache server and use one of the two WAN connections as gateway of the DNS lookup when the other is down and vice versa so my config is here :) :

/ip route
add distance=2 gateway=PPPoE-ADSL routing-mark=ADSL-RouteMark
add distance=1 gateway=*.*.*.* routing-mark=Radio-RouteMark
--------> SOLVED only the 2nd persists now

2) I'm trying to use DoH specially #NextDNS but it won't work no matter what I do ,like : flushing DNS of the router - disabling one of the route-mark mentioned above ,installing certificates from (https://dns.nextdns.io/) and (https://curl.se/ca/cacert.pem) and NTP is enabled (/system sntp client set enabled=yes primary-ntp=132.163.97.1 secondary-ntp=132.163.97.1) but the DoH just won't work :?

/ip dns static add name=dns.nextdns.io address=45.90.28.0 type=A
/ip dns static add name=dns.nextdns.io address=45.90.30.0 type=A
/ip dns static add name=dns.nextdns.io address=2a07:a8c0:: type=AAAA
/ip dns static add name=dns.nextdns.io address=2a07:a8c1:: type=AAAA
/ip dns set use-doh-server=“https://dns.nextdns.io/******” verify-doh-cert=yes

BTW my device os version is : 7.10.1
here are the error log of DoH :
"DoH server connection error: SSl:internal error (6)
DNS: DoH Server connection error: SSL:internal error (6)"

If there is a work around please let me know ... :D :D
Last edited by mtf on Mon Jul 10, 2023 8:06 pm, edited 3 times in total.
 
mtf
just joined
Topic Author
Posts: 6
Joined: Mon Dec 12, 2022 12:23 am

Re: Mikrotik router and the DNS cache server cannot connect to internet when using double WAN and route-mark toghether

Mon Dec 12, 2022 11:07 am

I actually fixed the first problem by adding exactly the commands mentioned in the first problem but with no route-mark so basically they are duplicate but without the route-mark option ...
Only the second issue exists now ..
Tnx alot for your attention 8)
Last edited by mtf on Mon Jul 10, 2023 7:59 pm, edited 1 time in total.
 
mtf
just joined
Topic Author
Posts: 6
Joined: Mon Dec 12, 2022 12:23 am

Re: Mikrotik router and the DoH cache server cannot connect to internet when using double WAN and route-mark toghether

Tue Dec 13, 2022 9:39 pm

and also forgot to tell you guys i've added NAT rule to redirect the dns inbound traffic

/ip firewall nat add chain=dstnat action=redirect protocol=udp dst-port=53
/ip firewall nat add chain=dstnat action=redirect protocol=tcp dst-port=53
Last edited by mtf on Mon Jul 10, 2023 7:26 pm, edited 1 time in total.
 
mtf
just joined
Topic Author
Posts: 6
Joined: Mon Dec 12, 2022 12:23 am

Re: Mikrotik router and the DoH cache server cannot connect to internet when using double WAN and route-mark toghether

Mon Jul 10, 2023 7:48 pm

dude should I enable normal DNS when using DoH ? Becuase in most of my researches they recommended me to "disable and remove ip v4 and ip v6 DNS in order to be able to use DoH" on mikrotik devices but this mikrotik manual tells me otherwise ? I actually did it and got no feedback other than normal DNS is being used becuase of the lack of DoH ... I'm so confused :(
and this is the Mikroitk YT channel I used during impelmetation of DoH on my device https://www.youtube.com/watch?v=w4erB0VzyIE
You do not have the required permissions to view the files attached to this post.

Who is online

Users browsing this forum: Valerio5000, vingjfg and 25 guests