Dnsmasq problem

Post new topic   Reply to topic    DD-WRT Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.)
Author Message
HHotline
DD-WRT Novice


Joined: 14 Feb 2022
Posts: 6

PostPosted: Mon Feb 14, 2022 21:17    Post subject: Dnsmasq problem Reply with quote
I tried to config dnsmasq and i obtain in syslog

DDWRT daemon.warn dnsmasq[1417]: ignoring nameserver 192.168.11.1 - local interface

Firmware: DD-WRT v3.0-r42335
Linksys WRT1900ACS

See picture include

My dns like nanom2.dan.lan and nanom5.dan.lan and dan.lan not work
Sponsor
dpp3530
DD-WRT Guru


Joined: 12 Dec 2007
Posts: 778
Location: Pittsburgh, PA USA

PostPosted: Mon Feb 14, 2022 22:19    Post subject: Reply with quote
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.

_________________
__________________________
Netgear R7800
DD-WRT v3.0 STD
Linksys WRT1900AC
DD-WRT v3.0 STD
HHotline
DD-WRT Novice


Joined: 14 Feb 2022
Posts: 6

PostPosted: Mon Feb 14, 2022 23:00    Post subject: Reply with quote
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
dpp3530
DD-WRT Guru


Joined: 12 Dec 2007
Posts: 778
Location: Pittsburgh, PA USA

PostPosted: Tue Feb 15, 2022 1:31    Post subject: Reply with quote
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:

dhcp-option=option:domain-name,plotz.lan
dhcp-option=option:domain-search,plotz.lan

_________________
__________________________
Netgear R7800
DD-WRT v3.0 STD
Linksys WRT1900AC
DD-WRT v3.0 STD
HHotline
DD-WRT Novice


Joined: 14 Feb 2022
Posts: 6

PostPosted: Tue Feb 15, 2022 2:50    Post subject: Reply with quote
I changed all static like you said 8.8.8.8 8.8.4.4 1.1.1.1.

I have same result. What’s now it’s not correct in my config?

See picture for

expand-hosts
address=/nanom5.dan.lan/192.168.101.1/

If the client ask Nanom5.dan.lan, for now it obtain googlesearch instead of 192.168.101.1
dpp3530
DD-WRT Guru


Joined: 12 Dec 2007
Posts: 778
Location: Pittsburgh, PA USA

PostPosted: Tue Feb 15, 2022 2:58    Post subject: Reply with quote
Try adding the following to your Additonal DNSMASQ Options:

dhcp-option=option:domain-name,dan.lan
dhcp-option=option:domain-search,dan.lan

Then restart DNSMASQ (killall -1 dnsmasq)

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.

_________________
__________________________
Netgear R7800
DD-WRT v3.0 STD
Linksys WRT1900AC
DD-WRT v3.0 STD
HHotline
DD-WRT Novice


Joined: 14 Feb 2022
Posts: 6

PostPosted: Tue Feb 15, 2022 4:23    Post subject: Reply with quote
Hi,

I did all you show me. Check now the new config I have…. domain dan.lan doesn’t work.

Can’t resolv host dan.lan

Idea????
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2972
Location: Germany

PostPosted: Tue Feb 15, 2022 9:00    Post subject: Reply with quote
You are using an old firmware build that is no longer supported.
Enable "local DNS" in the dnsmasq settings
HHotline
DD-WRT Novice


Joined: 14 Feb 2022
Posts: 6

PostPosted: Tue Feb 15, 2022 22:02    Post subject: Reply with quote
I’m trying but Don’t work….. other idea?
dpp3530
DD-WRT Guru


Joined: 12 Dec 2007
Posts: 778
Location: Pittsburgh, PA USA

PostPosted: Tue Feb 15, 2022 22:07    Post subject: Reply with quote
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?

_________________
__________________________
Netgear R7800
DD-WRT v3.0 STD
Linksys WRT1900AC
DD-WRT v3.0 STD
SurprisedItWorks
DD-WRT Guru


Joined: 04 Aug 2018
Posts: 1447
Location: Appalachian mountains, USA

PostPosted: Tue Feb 15, 2022 22:22    Post subject: Reply with quote
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.

_________________
2x Netgear XR500 and 3x Linksys WRT1900ACSv2 on 53544: VLANs, VAPs, NAS, station mode, OpenVPN client (AirVPN), wireguard server (AirVPN port forward) and clients (AzireVPN, AirVPN, private), 3 DNSCrypt providers via VPN.
HHotline
DD-WRT Novice


Joined: 14 Feb 2022
Posts: 6

PostPosted: Sat Feb 19, 2022 20:46    Post subject: Reply with quote
Hi,

All clients have 192.168.11.1 as DNS

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
jifffy
DD-WRT User


Joined: 08 Jun 2020
Posts: 58

PostPosted: Mon Mar 07, 2022 15:46    Post subject: Reply with quote
HHotline wrote:
Hi,

All clients have 192.168.11.1 as DNS

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.
dpp3530
DD-WRT Guru


Joined: 12 Dec 2007
Posts: 778
Location: Pittsburgh, PA USA

PostPosted: Mon Mar 07, 2022 16:08    Post subject: Reply with quote
is 192.168.1.12 only serving DNS names for dan.lan or does it forward to the internet for other domains?

If it only does dan.lan, then you can do something like this in Additional DNS config:

Code:
server=1.1.1.1
server=1.0.0.1
server=/dan.lan/192.168.1.12


Then DNSMASQ will use 192.168.1.12 for any queries to dan.lan, but use Cloudflare DNS for everything else.

_________________
__________________________
Netgear R7800
DD-WRT v3.0 STD
Linksys WRT1900AC
DD-WRT v3.0 STD
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.) 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 cannot attach files in this forum
You cannot download files in this forum