Wrong with the simple dnsmasq setup

dnsmasqdomain-name-systemnetworking

I have dnsmasq running on a server (its IP is 10.10.31.22), let's say its hostname is mydns here's the dnsmasq.conf:

domain-needed
bogus-priv
local=/argonath.mydomain.com/
interface=eth0
listen-address=127.0.0.1
no-hosts
addn-hosts=/etc/dnsmasq.hosts
expand-hosts
domain=argonath.mydomain.com

And here is dnsmasq.hosts:

10.10.31.8  mithrandir

Note I am only using dnsmasq for DNS, not for DHCP.

Now I have Linux and a windows box both using the dnsmasq server for their dns. On the linux box if I do nslookup mithrandirI get:

Server:     10.10.31.22
Address:    10.10.31.22#53

Name:   mithrandir
Address: 10.10.31.8

And on windows I get this:

Server: UnKnown
Address: 10.10.31.22

*** UnKnown can't find mithrandir: Non-existent domain

However nslookup mithrandir.argonath.mydomain.com on the windows box works:

Server: UnKnown
Address: 10.10.31.22

Name: mithrandir.argonath.jhgfs.com.au
Address: 10.10.31.8

My first question is, why don't I see mydns under "Server" for the linux box? Then of course my second question is why does the windows one fail? I assume it is to do with the server not reporting its name correctly. What have I set up wrong?

Best Answer

Worked it out. Windows adds a domain suffix on the end of queries, so it was actually asking for mithrandir.companydomain.com

(This is inside a company where all the workstations are put on the company.com domain).

After that failed, windows tried mithrandir.com which went to the wider net and came back as non existent.

Not sure how to solve the problem but at least I know it is an issue with the Windows workstation and not my dnsmasq config.

Related Topic