Joined: 12 Dec 2007 Posts: 671 Location: Pittsburgh, PA USA
Posted: Mon Feb 14, 2022 22:19 Post subject:
Your static DNS servers should be the upstream DNS servers on the internet that you'll be using for name resolution. Your router's local IP address is 192.168.11.1, so with the configuration in your screenshot, you're telling the router to look at itself for name resolution. What you really want is for the clients to look to the router for name resolution, while the router (using DNSMASQ) looks at a public DNS server on the internet, then provides those answers back to the client.
There are a number of good public DNS servers on the internet. I personally have been using Cloudflare (1.1.1.1 and 1.0.0.1). Other reasonable options include Google (8.8.8.8 and 8.8.4.4) or OpenDNS.
If you have "Automatic Configuration - DHCP" as your connection type, leaving the static DNS servers blank (0.0.0.0) will obtain DNS addresses from your ISP, which will work but may not be optimal. _________________ __________________________
Linksys WRT1900AC
DD-WRT v3.0 STD
Netgear R7800
DD-WRT v3.0 STD
I want that the client check first in dnsmasq of my router to see if there is an entry for this DNS resolution, if not then check on DNS public.
I want that dnsmasq keep 1500 DNS entry and I Try to configure my local name like dan.lan.
Actually when a client ask dan.lan it receive a Google search answer about dan.lan an I understand that not ask to my router dnsmasq. Same for nanom2.dan.lan and nanom5.dan.lan
Joined: 12 Dec 2007 Posts: 671 Location: Pittsburgh, PA USA
Posted: Tue Feb 15, 2022 1:31 Post subject:
HHotline wrote:
I want that the client check first in dnsmasq of my router to see if there is an entry for this DNS resolution, if not then check on DNS public.
That's exactly how it should work. I have a similar setup with my local LAN being "plotz.lan". I have a DHCP entry for my wireless printer, "laser". As shown in the screenshot, it'll return the local address from DNSMASQ for the local LAN, and a public IP for external addresses.
I changed the DHCP server on the Services page to LAN & WLAN and added the local domain. I also added two lines to additional DNSMASQ config:
Release and renew DHCP on your clients. If you have static DNS suffix search strings on your client machines, add dan.lan. If you don't, because of the lines above, it should pick the suffix up from DHCP. _________________ __________________________
Linksys WRT1900AC
DD-WRT v3.0 STD
Netgear R7800
DD-WRT v3.0 STD
Joined: 12 Dec 2007 Posts: 671 Location: Pittsburgh, PA USA
Posted: Tue Feb 15, 2022 22:07 Post subject:
Going to ask a couple of stupid questions:
From the client side, check to see what DNS servers it's using (ipconfig /all on a Windows machine). If it's using anything other than 192.168.11.1, you obviously won't get the answer you're expecting.
Also, are the client machines using any kind of proxy server? If they are, is the proxy server itself using 192.168.11.1 as its DNS? _________________ __________________________
Linksys WRT1900AC
DD-WRT v3.0 STD
Netgear R7800
DD-WRT v3.0 STD
Joined: 04 Aug 2018 Posts: 1418 Location: Appalachian mountains, USA
Posted: Tue Feb 15, 2022 22:22 Post subject:
Not an expert on these matters, but if you set LAN Domain to dan, you also need local=/dan/ in the Additional Dnsmasq Options (at least with recent builds). Before I added that line, my local searches were first going to the upstream DNS servers before being resolved locally. (I caught this with tcpdump.)
Another fine point: local lookups seem to me to be case sensitive. I haven't checked this out carefully, but I have had lookups fail until I fixed the case. _________________ Netgear XR500 and 4x Linksys WRT1900ACSv2 on 52955: VLANs, VAPs, NAS, station mode, OpenVPN client (AirVPN), wireguard server (AirVPN port forward) and clients (AzireVPN, AirVPN, private), 3 DNSCrypt providers via VPN.
On other forum, someone said to me to In the Additional DNSMasq Options box, add "no-resolv" on a new line.
What do you thing about that?
Thanks all
Hi, in my Additional DNSMasq Options I have the following:
no-resolv
bogus-priv
domain-needed
server=192.168.1.12
cache-size=2048
log-async=5
dns-forward-max=5096
min-cache-ttl=300
dhcp-option=6,192.168.1.12
I am using an external Odroid-C2 with cloudflared installed on it with pi-hole to use encrypted dns.
Then DNSMASQ will use 192.168.1.12 for any queries to dan.lan, but use Cloudflare DNS for everything else. _________________ __________________________
Linksys WRT1900AC
DD-WRT v3.0 STD
Netgear R7800
DD-WRT v3.0 STD