Community discussions

MikroTik App
 
Miguelin
just joined
Topic Author
Posts: 20
Joined: Thu Aug 27, 2020 10:08 am

Problems activating DoH in 7.11.2

Mon Nov 06, 2023 3:16 pm

Hi guys,

I am running a RB5009 with 7.11.2 RouterOS. This is my current DNS server using the internal DNS server provided by Mikrotik.

I decided to move to DoH in order to secure my DNS queries and all was going well at the beginning, using https://1.1.1.1/dns-query as main DoH Server.

A couple of days later, I saw some errors in my docker containers running in a Synology NAS. Some containers failed to resolve an internal static DNS set in Mikrotik (server.lan). This hostname points to 192.168.1.25 and it was working like a charm until I activated DoH.

As far as I discovered, these containers are using IPV6 DNS queries somehow and before activating DoH Mikrotik was able to resolve that static hostname but it can not once I set DoH.

I did a test setting a TYPE AAAA entry in static to the same 192.168.1.25 and it worked but it does nt have any sense because Mikrotik could resolve this before without it.

Do you know what could happen? Could be a bug activating DoH?

Regards
 
Miguelin
just joined
Topic Author
Posts: 20
Joined: Thu Aug 27, 2020 10:08 am

Re: Problems activating DoH in 7.11.2

Tue Nov 07, 2023 2:51 pm

Nobody has idea?
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12589
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Problems activating DoH in 7.11.2

Tue Nov 07, 2023 4:05 pm

Yes:
You haven't read the manual,
or if you have, you've only done so superficially,
or you haven't read it a second time to find out why you think it doesn't work as expected.

From the manual:
RouterOS prioritizes DoH over the DNS server if both are configured on the device.
Last edited by rextended on Tue Nov 07, 2023 4:14 pm, edited 4 times in total.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26922
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Problems activating DoH in 7.11.2

Tue Nov 07, 2023 4:07 pm

BTH is only in RouterOS BETA versions for now. 7.11.2 is not a beta
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12589
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Problems activating DoH in 7.11.2

Tue Nov 07, 2023 4:12 pm

BTH is only in RouterOS BETA versions for now.
7.11.2 is not a beta
Sorry, what???
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26922
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Problems activating DoH in 7.11.2

Tue Nov 07, 2023 4:13 pm

Posted in the wrong browser tab :) Ignore my message
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12589
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Problems activating DoH in 7.11.2

Tue Nov 07, 2023 4:14 pm

wrong browser tab
Too much work!!! :lol:

:D
 
Miguelin
just joined
Topic Author
Posts: 20
Joined: Thu Aug 27, 2020 10:08 am

Re: Problems activating DoH in 7.11.2

Wed Nov 08, 2023 12:28 pm

Yes:
You haven't read the manual,
or if you have, you've only done so superficially,
or you haven't read it a second time to find out why you think it doesn't work as expected.

From the manual:
RouterOS prioritizes DoH over the DNS server if both are configured on the device.
DoH is priorized, that is clear but it is not related with my issue as far as i can understand. I mean If I use DNS for upstream, IPV6 DNS queries can resolve the DNS local entries TYPE A in my static table but If I activate DoH for upstream...same static domains can not be resolved, only if I set a new TYPE AAAA entry pointing to the IPV4.

Case you metioned is when you have DoH and DNS upstream at the same time, isn´t it? That is not my case, I only use static DNS table in Mikrotik.
 
nediis
Frequent Visitor
Frequent Visitor
Posts: 63
Joined: Wed Jul 11, 2018 10:32 am

Re: Problems activating DoH in 7.11.2

Wed Nov 08, 2023 1:46 pm

Hi,
Hi guys, it was working like a charm until I activated DoH.
coincidence?
if "disable-ipv6: no"
try setting AAAA to a local IPv6 address (server.lan ... fe80:: ...)
then it will make sense
or set disable-ipv6: yes
 
Miguelin
just joined
Topic Author
Posts: 20
Joined: Thu Aug 27, 2020 10:08 am

Re: Problems activating DoH in 7.11.2

Wed Nov 08, 2023 3:58 pm

I tried it.

Nothing changes having IPV6 enabled or disabled. Same behaviour.

As far as I can see some containers are launching DNS with IPV6 format since the beginning. Until I have not had DoH activated, MIkrotik DNS could resolve those queries with a simple TYPE A record in the static entries.Once activated DoH, same IPV6 DNS queries do not resolve.

Rare...no idea.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12589
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Problems activating DoH in 7.11.2

Wed Nov 08, 2023 4:01 pm

You still not understand what is present on the manual...
From the manual:
RouterOS prioritizes DoH over the DNS server if both are configured on the device.
So, if you are not able to not understand that,
server.lan is not present on DoH server, so you can not solve it because
RouterOS prioritizes DoH over the DNS server if both are configured on the device.
and also because server.lan is not a valid DNS domain inside signed DoH.
 
Miguelin
just joined
Topic Author
Posts: 20
Joined: Thu Aug 27, 2020 10:08 am

Re: Problems activating DoH in 7.11.2

Wed Nov 08, 2023 4:36 pm

Hi mate,

That would have sense but I do not agree with yout approach. Take this line into account from my initial post (if you have read it):

I did a test setting a TYPE AAAA entry in static to the same 192.168.1.25 and it worked but it does nt have any sense because Mikrotik could resolve this before without it.

So local DNS is working somehow with DoH activated but only with TYPE AAAA records.

Regards
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12589
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Problems activating DoH in 7.11.2

Wed Nov 08, 2023 4:39 pm

It's your time, do as you please.
 
Institor
just joined
Posts: 22
Joined: Sat Apr 29, 2017 3:28 pm

Re: Problems activating DoH in 7.11.2

Wed Nov 08, 2023 4:53 pm

It's your time, do as you please.
As i understand there are no other configured DNS servers, only DoH.
Clearly static DNS entries should be prioritized over DoH or other (non-local) DNS servers (otherwise there is no point in having static DNS). And indeed that is the case.
internal static DNS set in Mikrotik (server.lan)
what type of static entry do you use? According to https://help.mikrotik.com/docs/display/ROS/DNS DoH is not compatible with FWD.
 
Miguelin
just joined
Topic Author
Posts: 20
Joined: Thu Aug 27, 2020 10:08 am

Re: Problems activating DoH in 7.11.2

Wed Nov 08, 2023 4:58 pm

It's your time, do as you please.
As i understand there are no other configured DNS servers, only DoH.
Clearly static DNS entries should be prioritized over DoH or other (non-local) DNS servers (otherwise there is no point in having static DNS). And indeed that is the case.
This was my point of view what i tried to explain. In fact, this line in the documentation confirms that static DNS is working with DoH activated:

Note that you need at least one regular DNS server configured for the router to resolve the DoH hostname itself. If you do not have any dynamical or static DNS server configured, add a static DNS entry for the DoH server domain name like this:
internal static DNS set in Mikrotik (server.lan)
https://help.mikrotik.com/docs/display/ROS/DNS [/url] DoH is not compatible with FWD.

A simple TYPE A pointing to 192.168.1.25.

Instead of this, using DoH, creating TYPE AAAA register pointed to the same IPV4: 192.168.1.25 works perfectly. No sense. This behaviour obligates to duplicate all static entries in the LAN with TYPE AAAA which is not a good idea...
 
nediis
Frequent Visitor
Frequent Visitor
Posts: 63
Joined: Wed Jul 11, 2018 10:32 am

Re: Problems activating DoH in 7.11.2

Thu Nov 09, 2023 1:21 am

/system logging
add topics=dns

and look at the logs
 
Miguelin
just joined
Topic Author
Posts: 20
Joined: Thu Aug 27, 2020 10:08 am

Re: Problems activating DoH in 7.11.2

Thu Nov 09, 2023 12:18 pm

/system logging
add topics=dns

and look at the logs
Really good idea.

As far as I saw at the logs:

1.- DoH activated

Router receives DNS query in TYPE AAAA (IPV6) so it returns "error"

2.- DNS activated (no DoH)

Router receives DNS query in TYPE A (IPV4) so it returns "no error" and the segment with DNS resolution data correctly.

It is quite "rare" because the containers which are launching those queries should not know about which option is activated in routeros (DoH or DNS) due to they have a DNS server configured to the Router IP. How can they change the query from TYPE A to TYPE AAAA depending on DoH or DNS activated?. Maybe something wrong in Mikrotik side processing DNS requests?
 
nediis
Frequent Visitor
Frequent Visitor
Posts: 63
Joined: Wed Jul 11, 2018 10:32 am

Re: Problems activating DoH in 7.11.2

Fri Nov 10, 2023 7:10 pm

If I don’t like how some functionality works or the lack of it in MT, I add, for example, Raspberry Pi.
For example, for DNS I use DoT on RPI and send legacy MT DNS queries to it.
 
Miguelin
just joined
Topic Author
Posts: 20
Joined: Thu Aug 27, 2020 10:08 am

Re: Problems activating DoH in 7.11.2

Sat Nov 11, 2023 6:41 pm

If I don’t like how some functionality works or the lack of it in MT, I add, for example, Raspberry Pi.
For example, for DNS I use DoT on RPI and send legacy MT DNS queries to it.
That is something I was thinking. Maybe DoH is not the best solution in Mikrotik now.

Who is online

Users browsing this forum: jkjkrules, mszru, pmichel and 71 guests