Names of machines in the local domain are not resolved

Hi,

my machines are in a local domain “lan”. I have the problem that on my QNAP NAS (QTS 5.2.10.3577) local names are not resolved. If I run for example:

nslookup myMachine

I get => ** server can’t find myMachine : NXDOMAIN

If I run instead

nslookup myMachine.lan

I get => Address: 192.168.1.144

I think this does not work because the search domain that the dhcp server on mu router sends is not set. On other machines resolv.conf looks like this:

nameserver 192.168.1.1
search lan
(or domain lan)

On the QNAP device I only see:

nameserver 127.0.1.1

And in resolv.dnsmasq

nameserver 192.168.1.1@eth0

In the past this was working.

Has someone an idea how to fix this?

You basically need a hosts file on your local machine that maps local names and addresses. Or if your local DNS server has the ability to set up aliases like that was well you could do it there.

Nslookup using myMachine.lan works because it’s the local domain that Bonjour/mDNS uses and the Bonjour processes keep record with the local domain.

Finally I found the time to looked at it again. I have changed on my OpenWrt router, the local domain to bla.
I have disabled bonjour, so it does not can have any effect. All devices use the router as nameserver.

After restarting of all my devices (server, laptop, Synolgy NAS, TV receiver and the QNAP NAS).

All not QNAP devices are able to ping a host with:

ping host and ping host.bla

ping host.lan does no longer work.

All devices have now either “serach bla” or “domain bla” in there /etc/resolv.conf

The only devices where this is missing are the QNAP NAS.
And on the QNAP devices only ping host.bla but not ping host is working.

When I manually add “domain bla” to /etc/resolv.conf ping host starts to work.

I think this is clearly a QNAP bug. They simply missed to set the domain entry in /etc/resolv.conf.

I don’t think resolve.conf is the correct file. You need to put entries in /etc/hosts. Once you do that you need to flush the DNS cache…

Try that.