How to stop DDWRT from adding DNS servers I do not want

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


Joined: 14 Jun 2013
Posts: 18

PostPosted: Sun Mar 14, 2021 23:12    Post subject: How to stop DDWRT from adding DNS servers I do not want Reply with quote


I want the dns in green, DDWRT adds the ones in red against my will.
Is there a way to solve this?

thanks


Last edited by Cartel on Sun Mar 14, 2021 23:40; edited 1 time in total
Sponsor
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5700

PostPosted: Sun Mar 14, 2021 23:29    Post subject: Reply with quote
Ignore WAN DNS? Setup -> Basic Setup
Cartel
DD-WRT Novice


Joined: 14 Jun 2013
Posts: 18

PostPosted: Sun Mar 14, 2021 23:41    Post subject: Reply with quote
blkt wrote:
Ignore WAN DNS? Setup -> Basic Setup


I thought that was a given when manually entering dns servers but I guess not with this firmware.

However this did solve my issue

thank you
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5700

PostPosted: Mon Mar 15, 2021 0:59    Post subject: Reply with quote
Understandable, feature did not exist until 08-02-2020-r44048, workaround was Query DNS in Strict Order.

Bypass resolv.dnsmasq in Services -> Services -> Additional DNSMasq Options add no-resolv, list servers.

no-resolv
server=
server=
server=

When strict order is combined with no-resolv the last server in the list is primary. "Back in my day, blabla.."
PascalCase
DD-WRT Novice


Joined: 15 Mar 2021
Posts: 3

PostPosted: Mon Mar 15, 2021 3:51    Post subject: Reply with quote
Thanks, blkt. Your answer also solved my issue with the extra dns servers.

I thought the "Ignore WAN dns" means I'm hosting my own dns server(s) locally.
Jay461
DD-WRT User


Joined: 18 Jul 2018
Posts: 51

PostPosted: Thu Mar 25, 2021 0:50    Post subject: Reply with quote
Thanks Blkt. I recently upgraded to r44719 and was not aware. What do I need to select in Dnamasq on the Services tab? Just want to ensure I am not using outdated selections.
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5700

PostPosted: Thu Mar 25, 2021 8:06    Post subject: Reply with quote
Query DNS in Strict Order was the easy workaround but it was possible to leak ISP DNS servers.

Bypass resolv.dnsmasq method was the other workaround to prevent any DNS leak.

These are no longer necessary with the Ignore WAN DNS checkbox.
Jay461
DD-WRT User


Joined: 18 Jul 2018
Posts: 51

PostPosted: Thu Mar 25, 2021 16:45    Post subject: Reply with quote
blkt wrote:
Query DNS in Strict Order was the easy workaround but it was possible to leak ISP DNS servers.
Bypass resolv.dnsmasq method was the other workaround to prevent any DNS leak.
These are no longer necessary with the Ignore WAN DNS checkbox.


Thanks. After enabling Ignore WAN DNS I have these settings. Services>Dnsmasq: I just have the Dnsmasq enabled all others are disabled.

Services>Additional Dnsmasq Options:
domain-needed
log-async=5
dhcp-option=6,192.168.x.xxx (pi-hole IP)
no-negcache
server=192.168.x.xxx (pi-hole IP)
expand-hosts

I am using a Pi-Hole (recursive) for DNS. Your thoughts on this? Thanks.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12884
Location: Netherlands

PostPosted: Thu Mar 25, 2021 16:56    Post subject: Reply with quote
I think you do not need anything in the Additional DNSMasq.

Just do the following:
Make sure ignore WAN DNS is enabled (ticked)
Make sure Local DNS and Gateway are left at its default 0.0.0.0
In Static DNS 1 set the IP address of the Pi
Disable (untick) "Use DNSMasq for DNS"

By disabling "Use DNSMasq for DNS" the clients will now receive the contents of Static DNS as their DNS servers

_________________
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
Jay461
DD-WRT User


Joined: 18 Jul 2018
Posts: 51

PostPosted: Thu Mar 25, 2021 17:33    Post subject: Reply with quote
Thanks egc. I have the Local DNS set to Pi-Hole IP and have Use DNSMasq for DNS selected- will change that.

Router:R7800
Firmware: r44719 std (plan on upgrading to the latest version when nobody's home)

I have been following your posts in regards to forcing DNS via pi-hole. Will these 2 iptables suggested by you work in my environment? I don't have VLAN's or guest WiFi. My Upstream DNS Servers in Pi-hole is 127:0:0:1#5335

Assuming my pi-hole IP is 192.168.xxx.x

iptables -t nat -I PREROUTING -i br0 -s ! 192.168.xxx.x -p tcp --dport 53 -j DNAT --to 192.168.xxx.x:53
iptables -t nat -I PREROUTING -i br0 -s ! 192.168.xxx.x -p udp --dport 53 -j DNAT --to 192.168.xxx.x:53

Also, I have no idea how to test it via putty/cli or how to identify if it works or not. Although, I am familiar with accessing the R7800 via Putty. Thanks
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12884
Location: Netherlands

PostPosted: Thu Mar 25, 2021 18:16    Post subject: Reply with quote
You only need these rules if you suspect clients (children) wanting to set their own DNS servers to dodge your control.
Otherwise all clients should already pointing to the the Pi.
But if you need to enforce it (there are still ways to dodge this, actually rather easily) then yes you can use these rules

_________________
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
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