DNS lookup returns NXDOMAIN for DHCP leases?

Hi!

When I try nslookup for one of the local machines that has a DHCP assigned IP address, I get NXDOMAIN back. If I try the same thing for a machine with a fixed lease I get the IP address.

The local domain name is “lan” and adding the donmain name to the lookup does not change anything.

Example of lookup of a machine with DHCP assigned IP addres:

$ nslookup raab
Server: 192.168.1.1
Address: 192.168.1.1#53

** server can’t find raab: NXDOMAIN

Example for a machine with fixed IP address:

$ nslookup solo
Server: 192.168.1.1
Address: 192.168.1.1#53

Non-authoritative answer:
Name: solo.lan
Address: 192.168.1.61

Using standard Turris OS 6.0.2.

Any ideas for what I could try?

Thanks in advance!

br,
kmm

I don’t know. You did select that “DHCP” checkbox in /reforis/network-settings/dns, right? (it seems to work on my Omnia with 6.0.2)

Hi, thanks for replying!
Checked and the “Enable DHCP clients in DNS” checkbox in reforis is enabled.

br,
kmm

Cn you try nslookup solo.lan?

Hi! No change with nslookup solo.lan unfortunately. Machines with DHCP assigned IP addresses returns NXDOMAIN while machines with fixed IP addresses can be resolved.

br,
kmm

I have similar problem, but if try like

nslookup somehost localhost

it resolves

Hi!

Just for the sake of it I ran the command

/etc/init.d/resolver reload

and the hosts with DHCP leases became resolvable…

But I’m not sure why this command had to be run manually, and what exactly it fixes?

Maybe the command can be put in cron or something?

br,
kmm

Hi!

Forget about the previous message. The real fix is as follows:

  1. Open reForis and go to Network Setting → DNS
  2. Uncheck “Enable DHCP clients in DNS” and save
  3. Check “Enable DHCP clients in DNS” and save

Then it works!

Found log lines like

Nov 24 22:05:28 turris dnsmasq-script[9354]: /usr/lib/dnsmasq/dhcp-script.sh: /etc/resolver/dhcp_host_domain_ng.py: line 3: import: not found
Nov 24 22:05:28 turris dnsmasq-script[9354]: /usr/lib/dnsmasq/dhcp-script.sh: /etc/resolver/dhcp_host_domain_ng.py: line 4: import: not found
Nov 24 22:05:28 turris dnsmasq-script[9354]: /usr/lib/dnsmasq/dhcp-script.sh: /etc/resolver/dhcp_host_domain_ng.py: line 5: import: not found

in /var/log/messages and search lead me to

https://forum.turris.cz/t/problems-with-local-network-dns-after-update/17998/4

where peci1 answer was the right solution.

And after the disable/enable steps above, the error lines in /var/log/messages went away.

vcunats reply earlier in this thread also indicated this solution, but unfortunately I didn’t quite managed to connected the dots then. Sorry about that!

Btw., existing DHCP connected clients must reconnect again in order to become resolvable.

br,
kmm

I didn’t know that you need to disable+enable to recover from 6.x update :frowning: