Custom hostnames stopped working?

Yesterday I needed my Android device to see my PC, and I added a hostname in Network > Hostnames.
All was working well. But today is stopped working all of sudden.
None of my devices see the hostnames that are set on router.

This if from my notebook:
$ nslookup pc.local
Server: 100.100.100.100
Address: 100.100.100.100#53

** server can't find pc.local: NXDOMAIN

And this is from router terminal:

nslookup pc.local

Server: 127.0.0.1
Address: 127.0.0.1#53

Name: pc.local
Address 1: 192.168.3.5
*** Can't find pc.local: No answer (this is ok, it's turned off ATM)

if I specify router address as DNS server to use, it's OK on notebook:
$ nslookup pc.local 192.168.3.1
Server: router.local
Address: 192.168.3.1#53

Name: pc.local
Address: 192.168.3.5

But browser on Android doesn't know anything about DNS server at 192.168.3.1.

How to fix DNS server propagation?

OpenWrt version 19.07.7 r11306-c4a6851c72 / LuCI openwrt-19.07 branch git-21.044.30835-34e0d65

Turned off DoH in the browser, and DoT on OS level?

There are several issues with that.

100.100.100.100 is not a valid private (rfc 1928) address, there shouldn't be any DNS server listening at that address - and even if it were, that would be a remote one, which doesn't know anything about your local DNS overrides.

.local as a top level domain is reserved for zeroconf/avahi/bonjour, it shouldn't (mustn't) be used for your local addresses, OpenWrt defaults to using .lan instead.

There is no DNS propagation from your local DNS overrides to (any) public servers, DNS resolution is only available within your local network (changes to those settings are effective immediately).

1 Like

eh, I just added games.local to Network > Hostnames and it worked for one day, but stopped working next day.

I have no idea why nslookup addresses 100.100.100.100 when called without DNS server specified.
And I don't need overrides of public servers, I just want my Android phone to query the router DNS server when connected to WiFi

100.100.100.100 is your ISP's DNS-server, since it resides inside the CGNAT. Maybe you have some software that causes your phone to always use that, or perhaps your phone has the option of using both WiFi and mobile-data simultaneously, like e.g. mine does? If I have that option enabled, Android randomly chooses to use my ISP's DNS-servers instead of the local one, which is why I always disable that.

I've done custom hostnames using the following -

Add entries to /etc/dnsmasq.conf in the format (example)...

dhcp-host=60:02:B4:20:58:FC,DIRECTV

Restart dnsmasq to take effect

C:\WINDOWS\system32>nslookup directv.lan
Server:  OpenWrt.lan
Address:  192.168.1.1

Name:    directv.lan
Address:  192.168.3.98