I am trying to get *.local domains to use the DNS server with vagrant-dns. In order for that to work I set up dnsmasq to run in front of it.
NetworkManager is installed but is set to dns=none
resolve.conf:
nameserver 127.0.0.1 #this points to dnsmasq
Testing resolve:
$ nslookup domain.local
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: domain.local
Address: 10.222.222.22
Dig resolves the same:
$ dig domain.local
; <<>> DiG 9.10.3-P4-Debian <<>> domain.local
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18052
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;domain.local. IN A
;; ANSWER SECTION:
domain.local. 86400 IN A 10.222.222.22
;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sun Jan 29 19:18:52 CST 2017
;; MSG SIZE rcvd: 49
That is the correct address. I can ping the ip:
ping 10.222.222.22
PING 10.222.222.22 (10.222.222.22) 56(84) bytes of data.
64 bytes from 10.222.222.22: icmp_seq=1 ttl=64 time=0.185 ms
But I can't ping the address:
$ ping domain.local
ping: domain.local: Name or service not known
I also tried from a browser to load the page hosted there, but I get a DNS error. The strange thing is that all other site seem to work fine, although I can't tell if it's using the localhost DNS server or not.
Using debian 8 Jessie/testing