Local DNS won't work on v3.0-r42819 std

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


Joined: 20 Aug 2006
Posts: 4

PostPosted: Wed Jan 04, 2023 17:05    Post subject: Local DNS won't work on v3.0-r42819 std Reply with quote
Trying to get local DNS using DNSMasq for my local DHCP clients. Nothing seems to work. I was at a newer version (r51154) which doesn't even HAVE the "local dns" toggle button available. Everything else is working correctly, except local DNS name resolution.

Is there a decent document somewhere that gives instructions on how to setup DNS so local DHCP clients can be found using name resolution?

My setup: Netgear R7000 w/v3.0-r42819 std (03/30/20). Local network 192.168.1.0/24 w/DHCP serving IPs and some reserved DHCP addresses.
DNS Servers are 192.168.1.1, 8.8.8.8, 8.8.4.4 in that order.

DNS Settings (ON means toggled ENABLED)
Quote:
Use DNSMasq for DNS ON
DHCP-Authoritative ON
Recursive DNS Resolving (Unbound) OFF
Forced DNS Redirection ON

Use JFFS2 for client lease DB ON
Use NVRAM for client lease DB ON
Used Domain LAN & WLAN

SmartDNS Resolver OFF
Dnsmasq ON
Encrypt DNS OFF
Cache DNSSEC data OFF
Validate DNS Replies (DNSSEC) OFF
Check unsigned DNS replies OFF
Local DNS ON
No DNS Rebind ON
Query DNS in Strict Order ON
Add Requestor MAC to DNS Query OFF
RFC4039 Rapid Commit support ON
NTP is set to pool.ntp.org with correct TZ set.


Thanks in Advance!
Sponsor
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2927
Location: Germany

PostPosted: Wed Jan 04, 2023 17:23    Post subject: Reply with quote
This works out of the box with the default settings and "local DNS" setting does not exist anymore as it is always enabled.

Maybe the client you are using is the problem.
I also have some devices that do not resolve local names, in my case it is a "systemd-resolved" bug on the corresponding computers.
zhamm
DD-WRT Novice


Joined: 20 Aug 2006
Posts: 4

PostPosted: Wed Jan 04, 2023 17:38    Post subject: Reply with quote
ho1Aetoo wrote:
This works out of the box with the default settings and "local DNS" setting does not exist anymore as it is always enabled.

Maybe the client you are using is the problem.
I also have some devices that do not resolve local names, in my case it is a "systemd-resolved" bug on the corresponding computers.


It seems to work differently than I've used before, but I mostly have it working. Setting the local DHCP domain is important, as the syslog was showing all sorts of other local domains (local, tor, bind, invalid) in the dns logs. Once I added the domain "home" to the router and DHCP config, and made sure my PC's domain was set to "home", DNS queries for local LAN work. This makes sense, but I don't remember it working like this on the 2.4 versions of DD-WRT.

Thanks for the reply!
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12839
Location: Netherlands

PostPosted: Wed Jan 04, 2023 17:41    Post subject: Reply with quote
As @ho1Aetoo already said it works out of the box only not how you have set up.

Static DNS are the upstream DNS servers, what you are doing is that DNSMasq starts querying itself as you have entered the routers (=DNSMasq) address as upstream resolver, so it starts looping.

and to make matters worse you als have enabled Query DNS in strict order.

My advice upgrade to a recent build and put settings in manually as you are coming from a very old build with nowadays wrong settings/defaults.

For DNS, on Basic Setup page:
enable Ignore WAN DNS (so that you are not using the ISP DNS server)
under Static DNS 1 and 2 add trusted upstream DNS resolvers e.g. 9.9.9.9, 1.0.0.1, 8.8.8.8 etc
Leave everything else at defaults

If you want secure DNS research using SmartDNS (a sticky in the Advanced networking forum)

_________________
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
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2927
Location: Germany

PostPosted: Wed Jan 04, 2023 20:28    Post subject: Reply with quote
zhamm wrote:
ho1Aetoo wrote:
This works out of the box with the default settings and "local DNS" setting does not exist anymore as it is always enabled.

Maybe the client you are using is the problem.
I also have some devices that do not resolve local names, in my case it is a "systemd-resolved" bug on the corresponding computers.


It seems to work differently than I've used before, but I mostly have it working. Setting the local DHCP domain is important, as the syslog was showing all sorts of other local domains (local, tor, bind, invalid) in the dns logs. Once I added the domain "home" to the router and DHCP config, and made sure my PC's domain was set to "home", DNS queries for local LAN work. This makes sense, but I don't remember it working like this on the 2.4 versions of DD-WRT.

Thanks for the reply!


And you don't use a Linux PC with systemd by any chance ?
As far as I know systemd / poettering is the only xyz that broke this

if the client supports it, it works fine without domain

poettering believes that such single-label queries should not be forwarded to upstream servers

query systemd-resolved

    dig DD-WRT @127.0.0.53

    ; <<>> DiG 9.16.1-Ubuntu <<>> DD-WRT @127.0.0.53
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 6923
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 65494
    ;; QUESTION SECTION:
    ;DD-WRT. IN A

    ;; Query time: 0 msec
    ;; SERVER: 127.0.0.53#53(127.0.0.53)
    ;; WHEN: Mi Jan 04 21:01:15 CET 2023
    ;; MSG SIZE rcvd: 35


query dnsmasq

    dig DD-WRT @192.168.1.1

    ; <<>> DiG 9.16.1-Ubuntu <<>> DD-WRT @192.168.1.1
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12021
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 1232
    ;; QUESTION SECTION:
    ;DD-WRT. IN A

    ;; ANSWER SECTION:
    DD-WRT. 0 IN A 192.168.1.1

    ;; Query time: 3 msec
    ;; SERVER: 192.168.1.1#53(192.168.1.1)
    ;; WHEN: Mi Jan 04 21:02:32 CET 2023
    ;; MSG SIZE rcvd: 51


and the explanation is quite nonsense because not every DNS server is an upstream server
such behavior breaks local DNS servers
this is as said a client problem and not a problem of dd-wrt/dnsmasq

https://github.com/systemd/systemd/issues/13763

Rolling Eyes
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