What's new

DNSMasq local DNS

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

OK I tried it on my router and it works OK. I set the "Domain Name" to "lan" on the router and added the following line to dnsmasq
Code:
address=/web.lan/web2.lan/sonarr.lan/192.168.1.22
Code:
C:\Users\Colin>nslookup web.lan
Server:  router.asus.com
Address:  192.168.1.1

Name:    web.lan
Address:  192.168.1.22


C:\Users\Colin>nslookup sonarr.lan
Server:  router.asus.com
Address:  192.168.1.1

Name:    sonarr.lan
Address:  192.168.1.22


C:\Users\Colin>nslookup web2.lan
Server:  router.asus.com
Address:  192.168.1.1

Name:    web2.lan
Address:  192.168.1.22

So there must be something different about your setup that we're not seeing.
 
After this I tried the suggested address=/web.lan/web2.lan/sonarr.lan/192.168.1.2 to dnsmasq.conf.add (which by the way is the only line in this file).

C:\Users\Joakim>nslookup sonarr.lan
DNS request timed out.
timeout was 2 seconds.
Server: UnKnown
Address: 192.168.1.1
The router can't even do a reverse lookup on it's own name which suggests to me that your dnsmasq configuration is corrupted.

How are you creating the dnsmasq.conf.add file? You must use a "unix" editor and not a Windows one (like Notepad or WordPad).
 
OK I tried it on my router and it works OK. I set the "Domain Name" to "lan" on the router and added the following line to dnsmasq
Code:
address=/web.lan/web2.lan/sonarr.lan/192.168.1.22
Code:
C:\Users\Colin>nslookup web.lan
Server:  router.asus.com
Address:  192.168.1.1

Name:    web.lan
Address:  192.168.1.22


C:\Users\Colin>nslookup sonarr.lan
Server:  router.asus.com
Address:  192.168.1.1

Name:    sonarr.lan
Address:  192.168.1.22


C:\Users\Colin>nslookup web2.lan
Server:  router.asus.com
Address:  192.168.1.1

Name:    web2.lan
Address:  192.168.1.22

So there must be something different about your setup that we're not seeing.
That is so weird. I have no special settings I think. Does it take long time for the dns settings to take effect? I have tried waiting for a while, maybe 10 min. No success.
service restart_dnsmasq
No internet access, no router access. Still connected to router through wired.
If I reboot I can't even get the wired to connect.
 
That's a known bug on Windows nslookup if you have IPv6 enabled...
I wondered about that, but post #17 suggests that he's not using IPv6. In fact his settings are almost identical to mine and I'm not seeing that problem :confused:. Plus, the "Unknown" message only appeared after he created the dnsmasq.conf.add file.
 
I wondered about that, but post #17 suggests that he's not using IPv6. In fact his settings are almost identical to mine and I'm not seeing that problem :confused:. Plus, the "Unknown" message only appeared after he created the dnsmasq.conf.add file.
Scroll down a bit in #17.....he's getting an IPv6 address from Taredo....
 
Scroll down a bit in #17.....he's getting an IPv6 address from Taredo....
I'm guessing it's these two lines that I don't have.
Code:
   DHCPv6 IAID . . . . . . . . . . . : 150994944
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1D-76-31-1B-74-D4-35-E9-FE-66
I never would have spotted that. Thanks for the tip.

So if the "Unknown" message is a red herring, there's still something fundamentally misconfigured if he looses access to the internet and the router!
 
I never would have spotted that. Thanks for the tip.
Further down.....
Code:
Tunnel adapter Teredo Tunneling Pseudo-Interface:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   IPv6 Address. . . . . . . . . . . : 2001:0:9d38:6abd:..........

I'll look through the thread and see if I can add anything....
 
Maybe try disabling Taredo....
Code:
netsh interface teredo set state disabled
via admin prompt.....then reboot or disable/enable the adapter.
 
Further down.....
Yes, that was the part I was referring to. I don't have IPv6 but Teredo still gives me a pseudo IPv6 address, but not the DHCPv6 stuff.
Code:
Tunnel adapter Teredo Tunneling Pseudo-Interface:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   IPv6 Address. . . . . . . . . . . : 2001:0:9d38:78cf:2cce:199:ade3:94a3(Preferred)
   Link-local IPv6 Address . . . . . : fe80::2cce:199:ade3:94a3%11(Preferred)
   Default Gateway . . . . . . . . . : ::
   NetBIOS over Tcpip. . . . . . . . : Disabled
 
Would it be the problem of having two IP's answer for requests if the Router's Domain name is, say router.lan and then configure a web server to listen to another IP on that router with a domain such as sonarr.lan?
With an entry such as this:
address=/web.lan/web2.lan/sonarr.lan/192.168.1.22
it may work but not with a wildcard entry like this:
address=/lan/192.168.1.22

Could you post the full /etc/dnsmasq.conf before and after adding the dnsmasq.conf.add?
 
Would it be the problem of having two IP's answer for requests if the Router's Domain name is, say router.lan and then configure a web server to listen to another IP on that router with a domain such as sonarr.lan?
With an entry such as this:
address=/web.lan/web2.lan/sonarr.lan/192.168.1.22
it may work but not with a wildcard entry like this:
address=/lan/192.168.1.22

Could you post the full /etc/dnsmasq.conf before and after adding the dnsmasq.conf.add?
I have replaced / with slash, get a blocked message from this forum if not.
Here's etc "slash" dnsmasq.conf
https://pastebin.com/bEse2TXy

Here's etc "slash" hosts.dnsmasq
https://pastebin.com/iTkcxitu
 
Last edited:
Those files don't contain any changes from dnsmasq.conf.add. We need to see the files after the changes have been applied.
That's the thing, I am not able to post that, as soon as I edit the dnsmasq.conf.add the router stops working with my PC. So I cannot check anything after this.
 
That's the thing, I am not able to post that, as soon as I edit the dnsmasq.conf.add the router stops working with my PC. So I cannot check anything after this.
Does merely creating the dnsmasq.conf.add file stop your router working :confused:? Or is it when you apply the change, i.e. rebooting the router or issuing a "service restart_dnsmasq"?
 
Does merely creating the dnsmasq.conf.add file stop your router working :confused:? Or is it when you apply the change, i.e. rebooting the router or issuing a "service restart_dnsmasq"?
Creating it is fine, but applying changes makes it stop working :(
 
Creating it is fine, but applying changes makes it stop working :(
Can you try this instead. Log onto the router using something like PuTTY and...
Code:
cd /jffs/configs
echo "address=/web.local/web2.local/sonarr.local/192.168.1.2" > dnsmasq.conf.add
sync
reboot
 
Can you try this instead. Log onto the router using something like PuTTY and...
Code:
cd /jffs/configs
echo "address=/web.local/web2.local/sonarr.local/192.168.1.2" > dnsmasq.conf.add
sync
reboot
Finally got it working, I did format the JFFS partition and tried the above you said. And now I got zero problems this far.
Something was off with the partition maybe?
 
Finally got it working, I did format the JFFS partition and tried the above you said. And now I got zero problems this far.
Something was off with the partition maybe?
Yeah something was messed up somewhere. I blame the aliens and their pesky flying saucers.:)

Glad you got it working.
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top