I've configured a DNS server on my home LAN. It serves a few extra domain names, such as foo
. Note that foo
is configured to return 404s for all requests. (I haven't gotten to getting it to do what I want it to do.) Also, note that foo
is a single-level domain name, i.e., foo.
is the FQDN. Hopefully obvious, this is not a name that I expect to resolve anywhere but my home network.
A lone Windows machine on the network seems to be failing DNS requests — I have no idea why.
Network topology, just for reference:
^ out to Comcast
|
* Comcast modem
|
+-* 10.1.10.2, a server, hosting a webserver and a DNS server.
+-* 10.1.10.3/192.168.2.1, a wireless router.
|
(via WiFi)
|
+-* an Android phone
+-* a Windows laptop.
+-* a Linux laptop.
The wireless router is configured to use 10.1.10.2 for DNS. However, it sends out 192.168.2.1 as the DNS server in its DHCP response (verified with Wireshark).
The Android phone, if asked to do http://foo/
in Chrome, gets the 404. (Which is correct.)
The Windows machine, if asked to do the same in Chrome, fails, with a "Oops! Google Chrome could not find" page. Using nslookup
on the machine, and giving it foo
at the prompt, it appears to be unable to find foo
. It claims to be using 192.168.2.1 as a DNS server. If I nslookup
foo.
(note the dot), I get the right IP address back. If I request http://10.1.10.2
, I get the 404.
On the Linux machine, a dig @10.1.10.2 foo
gives the right response. Additionally, dig @192.168.2.1 foo
also gives the correct result.
What the heck is going on? Why is the Windows machine returning not found for DNS responses, whereas all the other machines seem to get the right answer?
Edit: I have Python on the Windows machine. I actually have two domains, foo
and bar
. Python's socket.gethostbyname
can see foo
, but not bar
. (They're being served by the same DNS server mind you — the records are identical save for the name.) nslookup
can't see squat, except the one with dot. Nothing works in Chrome.
foo
is a fully qualified domain, and appends its own primary suffix - eq it is looking forfoo.local
. The dot lets Windows know it is fqdn. Is the domain really a single level, it contains no dots?foo
. Obviously, this DNS server is not serving to the Internet, and is only intended to work here, on my home network.