I have BIND9 running on my MBP with a zone for the TLD dev. I then have /etc/resolver/dev
setup with the line nameserver 127.0.0.1
so that resolution for that TLD only is performed using my local BIND server.
If I ping an entry in the zone file for dev
(e.g. ping test.dev
) ping correctly resolves the host to 127.0.0.1
as BIND is configured to return. However if I use dig to lookup the DNS records for that host, (e.g., dig test.dev
) I get the following:
; <<>> DiG 9.9.4 <<>> test.dev
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28496
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;test.dev. IN A
;; ANSWER SECTION:
test.dev. 0 IN A 67.215.65.132
;; Query time: 51 msec
;; SERVER: 208.67.222.222#53(208.67.222.222)
;; WHEN: Wed Dec 11 09:04:00 EST 2013
;; MSG SIZE rcvd: 52
So dig is using the DNS server configured for all queries rather than going through the local resolution process like ping is. To make it more interesting, I'm pretty confident that this used to work even on Mavericks, since I'd put this into a install guide that I'd created by running through the process myself.
Is there a reason why dig is resolving differently than ping?