[SOLVED] Why does nslookup not work with hostnames which defined in DHCP and DNS?

Hello,
I would be interested in the following.

I can enter “hostnames” in DHCP and DNS via reForis GUI - Advanced Administration for example test.mylan.lan.
Then I can ping these in my lan but e.g. nslookup does not recognize these hostnames.

Presumably because turris uses a different resolver? But nslookup doesn’t work on my DHCP clients with these “hostnames” either, nowhere in my LAN.
With the “normal” host names, e.g. mydevice.lan nslookup works… but only not with this additional hostnames.
Why is this the case and can I change it? In reForis itself I cannot find an option to define additional hostnames.

Certainly not by default. Anyway, nslookup should print which server it asked. (though I personally dislike nslookup)

On the turris it ask it self and on a client in the lan it ask the IP from the turri router.

turris nslookup:

root@turris:~# nslookup example.myurl.lan
Server:		127.0.0.1
Address:	127.0.0.1:53

** server can't find example.myurl.lan: NXDOMAIN

** server can't find example.myurl.lan: NXDOMAIN

turris ping:

root@turris:~# ping example.myurl.lan
ping: example.myurl.lan: Name does not resolve

client nslookup:

root@client:~# nslookup example.myurl.lan
Server:		192.168.1.1
Address:	192.168.1.1#53

** server can't find example.myurl.lan: NXDOMAIN

client ping:

root@client:~# ping example.myurl.lan
PING example.myurl.lan (192.168.1.9) 56(84) bytes of data.
64 bytes from 192.168.1.9 (192.168.1.9): icmp_seq=1 ttl=64 time=0.684 ms
^C
--- example.myurl.lan ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.684/0.684/0.684/0.000 ms

EDIT:
I found the reason. I had created the hostname as

example.myurl.lan

but it must be

example.myurl

because .lan comes from the DHCP. After that nslookup is working:

root@turris:~# nslookup example.myurl.lan
Server:		127.0.0.1
Address:	127.0.0.1:53

Non-authoritative answer:
Name:	example.myurl.lan
Address: 192.168.1.9

Non-authoritative answer:

My mistake :upside_down_face:, everything is fine now.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.