How does DD-WRT query the DNS servers? All or first only?

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Author Message
rotation
DD-WRT User


Joined: 13 Dec 2012
Posts: 54

PostPosted: Sat Feb 20, 2021 10:49    Post subject: How does DD-WRT query the DNS servers? All or first only? Reply with quote
Assuming I have DNS 1 set to a privacy related DNS, the others to less privacy but higher availability, how does DD-WRT query the DNS Servers?

Are all queried at once and the first reply is taken or is DNS 1 queried first, if no reply the second and then the third?

My current DNS Settings are:

1) 84.200.69.80
2) 1.1.1.1
3) 9.9.9.9

taken from here:
https://securitytrails.com/blog/dns-servers-privacy-security

First is DNSWatch (privacy related) second is Cloudflare (Privacy) third one is Quad9 (not that much privacy they keep logs).

Is Quad9 still queried everytime form DD-WRT and therefore the privacy related DNS is made not that private because of DD-WRT behavior?
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12885
Location: Netherlands

PostPosted: Sat Feb 20, 2021 10:56    Post subject: Reply with quote
Although the wiki's are not always up to date it is a good starting point:
https://wiki.dd-wrt.com/wiki/index.php/DNSMasq_as_DHCP_server

See DNS strict order

To get the best out of DDWRT and the forum read the forum guidelines with helpful pointers:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6868
Location: Romerike, Norway

PostPosted: Sat Feb 20, 2021 12:28    Post subject: Reply with quote
smart dns do query all servers and return the best answer.
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6437
Location: UK, London, just across the river..

PostPosted: Sat Feb 20, 2021 14:22    Post subject: Reply with quote
in general DNSmasq uses those specified in the x3 boxes..but better way to make them work is in strict order, so if the first fails than next one is queried...

Per Yngve Berg wrote:
smart dns do query all servers and return the best answer.


and because of that it's not a good practice to use mixed DNS resolvers with packet filtering/ad-blocking and without...as they will concurrent each other...

Best practice if you use just DNSmasq, is to put them in advanced DNSmasq config box...

no-resolv
server=9.9.9.9
server=1.1.1.1
server=84.200.69.80

Do keep in mind if you select strict order, the last becomes first...Wink

Other ways to use DNS enhanced services are, via Unbound, Stubby, DNScrypt or SmartDNS via jffs..
for few of those you can check red and the green links in my signature and for SmartDNS and Unbound there are good dedicated threads in the forum, check them too..

Best bet is DNScrypt via entware, than SmartDNS via jffs, Unbound and Stubby via entware...Stubby is the lightest option and works on most of the routers...as well SmartDNS embedded option or full version via jffs ...all those above offer encrypted DNS services and more versatile DNS handling...

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913


Last edited by Alozaros on Sat Feb 20, 2021 18:32; edited 1 time in total
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14221
Location: Texas, USA

PostPosted: Sat Feb 20, 2021 16:25    Post subject: Reply with quote
Per Yngve Berg wrote:
smart dns do query all servers and return the best answer.


Did anyone ever get a fully-functional guide or wiki posted for SmartDNS yet?

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5700

PostPosted: Sat Feb 20, 2021 16:53    Post subject: Reply with quote
SMARTDNS Guide- W.I.P.

That's all I know.
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14221
Location: Texas, USA

PostPosted: Sat Feb 20, 2021 16:58    Post subject: Reply with quote
This wasn't ever linked in the thread that I saw Cool

https://wiki.dd-wrt.com/wiki/index.php/SmartDNS_-_WIP

I'm only a bill sitting on capitol hill waiting to become a law.

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5700

PostPosted: Sat Feb 20, 2021 17:06    Post subject: Reply with quote
Oh neat, it shows up in Basic Tutorials (or wiki search bar).
eibgrad
DD-WRT Guru


Joined: 18 Sep 2010
Posts: 9157

PostPosted: Sun Feb 21, 2021 2:15    Post subject: Reply with quote
To my knowledge, this is how DNSMasq works.

By default, it will initially query *all* available servers and determine which is fastest, making it the preferred server. From time to time, at its own discretion, it may reevaluate all the available servers and perhaps change the preferred server.

One way to prevent the above is to specify strict-order, which as its name implies, will try the servers in order. If the current server responds (whether the name resolves or NOT), the process stops. The only way any other server is accessed is if the prior server literally can't be reached (I know that surprises some ppl; they mistakenly believe that a "not found" condition will result in DNSMasq accessing additional servers, but it won't).

Finally, there's the all-servers directive, which accesses *all* available servers w/ each query. Whichever server returns a valid response first is the one reported back to the client (again, including "not found"). As you might imagine, this isn't used all that often given the additional overhead. But at least in theory, you're always getting the fastest response possible from DNS.

_________________
ddwrt-ovpn-split-basic.sh (UPDATED!) * ddwrt-ovpn-split-advanced.sh (UPDATED!) * ddwrt-ovpn-client-killswitch.sh * ddwrt-ovpn-client-watchdog.sh * ddwrt-ovpn-remote-access.sh * ddwrt-ovpn-client-backup.sh * ddwrt-mount-usb-drives.sh * ddwrt-blacklist-domains.sh * ddwrt-wol-port-forward.sh * ddwrt-dns-monitor.sh (NEW!)
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum