I'm using dnsmasq to route requests to .lh hosts to my vagrant server currently running on 192.168.0.5 on Mac OSX 10.6.
scutil --dns returns the correct resolver info:
resolver #9
domain : lh
nameserver[0] : 192.168.0.5
But ping (and also the browser) is unable to resolve the domain:
ping root.blah.lh
ping: cannot resolve root.blah.lh: Unknown host
I added 192.168.0.5 to my list of DNS servers in my network settings, and it's sitting at the top of the list, above 8.8.8.8 - seems to be getting completely ignored.
sudo killall -HUP mDNSResponder and sudo dscacheutil -flushcache apparently have no effect.
How can I get .lh hosts to resolve to 192.168.0.5 correctly?
(the stuff below this line is historical, and has been moved here after Alan Shutko's answer indicating that nslookup is not a useful analysis tool in this case)
nslookup is also unable to resolve the domain:
nslookup blah.lh
Server: 8.8.8.8
Address: 8.8.8.8#53
** server can't find blah.lh: NXDOMAIN
I also tried adding 127.0.0.1 to my DNS server list in network settings (at the top), which produces a lookup on local, viz:
nslookup blah.lh
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: blah.lh
Address: 127.0.0.1
dscacheutil -q host blah.lhmight work. If it does, I'll update my answer. Do other commands (notably Safari) work? The command-line tools probably use /etc/resolv.conf – Alan Shutko Feb 26 '13 at 23:45ping blah.lhreturnsping: cannot resolve root.blah.lh: Unknown hostand attempts through the browser return a server not found message. I don't know if thedscacheutil -q host blah.lhwas for me or the other guy, but when I ran it just in case it gave me a list of hosts from my/etc/hostsfile. – hollsk Feb 27 '13 at 20:40