I'd like to get
.local addresses (such as test.local) to point to
127.0.0.1 but it isn't working. I'm on latest Ubuntu. In /etc/NetworkManager/NetworkManager.conf I commented out
dns=dnsmasq then did
sudo service network-manager restart.
I then installed dnsmasq and added a
address=/local/127.0.0.1 to /etc/dnsmasq.d/mycustomfile then did
sudo service dnsmasq restart. Apart from what I've mentioned I made no other changes.
But when I visit test.local it doesn't resolve to 127.0.0.1, doing a ping of that .local address also isn't successful. Maybe the contents of
/etc/resolv.conf are relevant, it is just the default I didn't change it:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 18.104.22.168 nameserver 22.214.171.124
This is the output when I run dnsmasq not as a daemon:
$ sudo dnsmasq --no-daemon dnsmasq: started, version 2.68 cachesize 150 dnsmasq: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth dnsmasq: reading /etc/resolv.conf dnsmasq: using nameserver 126.96.36.199#53 dnsmasq: using nameserver 188.8.131.52#53 dnsmasq: read /etc/hosts - 9 addresses
When dnsmasq is running the /etc/resolv.conf automatically updates (and reverts back to the entry above when dnsmasq is stopped):
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 127.0.0.1
$ sudo nslookup test.local 127.0.0.1 Server: 127.0.0.1 Address: 127.0.0.1#53 Name: test.local Address: 127.0.0.1
But still doing a ping to localhost doesn't work.
What do I need to do to get dnsmasq working to resolve .local addresses?