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

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


Joined: 13 Dec 2012
Posts: 49

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: 7185
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 R7800, R6400v1, R6400v2, Linksys EA8500, EA6900 (XvortexCFE), E2000 (converted WRT320N), WRT54GS v1.
OpenVPN Policy Based Routing: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=321686
Install guide R6400v2:http://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
OpenVPN Server Setup:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=318795
Install guide R7800: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Wireguard Server setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1183135
Wireguard Client setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324624
Wireguard Advanced setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324787
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: 5964
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: 4166
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 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 45711 BS AP,NAT
TP-Link WR740Nv4 -----DD-WRT 44251 BS WAP/Switch
TP-Link WR1043NDv2 ---DD-WRT 45820 BS AP,NAT,AP Isolation,Firewall,Local DNS,Forced DNS,DoT,VPN,VLAN
TP-Link WR1043NDv2 ---DD-WRT 45711 BS AP,NAT,AD/Block,Firewall,Local DNS,Forced DNS,DoT,VPN,VLAN
TP-Link WR1043NDv2 ---Gargoyle OS 1.12.0 AP,NAT,QoS,Quotas
Qualcomm/IPQ8065
Netgear R7800 -----DD-WRT 45735 BS AP,NAT,AD-Block,AP&Net Isolation,VLAN's,Firewall,Local DNS,DoT
Broadcom
Netgear R7000 -----DD-WRT 45735 BS AP,Wi-Fi OFF,NAT,AD-Block,Firewall,Local DNS,Forced DNS,VLAN's,DoT,VPN
-----------------------------------------------------------------------------------------------
Stubby for 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: 7958
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?

_________________
Official Forum Rules, Guidelines & Helpful InformationFirmware FAQInstallation WikiWhere Do I Download Firmware?
DON'T use Chromium-based browsersRTFM/STFW TL;DR is NOT an excuse. • Why Should I Care What Color the Bikeshed Is?
Please DO NOT PM me with questions; Ask in the forum. ---------------------- Linux User #377467 counter.li.org / linuxcounter.net
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 2305

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: 7958
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.

_________________
Official Forum Rules, Guidelines & Helpful InformationFirmware FAQInstallation WikiWhere Do I Download Firmware?
DON'T use Chromium-based browsersRTFM/STFW TL;DR is NOT an excuse. • Why Should I Care What Color the Bikeshed Is?
Please DO NOT PM me with questions; Ask in the forum. ---------------------- Linux User #377467 counter.li.org / linuxcounter.net
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 2305

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: 8563

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
ddwrt-ovpn-split-advanced.sh
ddwrt-ovpn-remote-access.sh
ddwrt-ovpn-client-backup.sh
ddwrt-mount-usb-drives.sh
itwontbewe
DD-WRT User


Joined: 29 Sep 2020
Posts: 114

PostPosted: Sun Feb 21, 2021 23:43    Post subject: Reply with quote
cloudflare has a malware blocking option available now too. looks like it can now do DoT as well
1.1.1.2
https://en.wikipedia.org/wiki/Public_recursive_name_server
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum 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