Posted: Wed Jan 04, 2023 17:05 Post subject: Local DNS won't work on v3.0-r42819 std
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.
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.
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.
Joined: 18 Mar 2014 Posts: 12839 Location: Netherlands
Posted: Wed Jan 04, 2023 17:41 Post subject:
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
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
;; 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