2

Xubuntu 15.10 using Ethernet

From my understanding, /var/run/dnsmasq/resolv.conf should contain the nameservers used by dnsmasq to resolve addresses and is configured by a script called by network-manager. In my case, the file contains only nameserver 127.0.1.1 which doesn't seem right. My IPv4 address of the only network interface on my machine is static and the IPv6 auto-configured. In both cases my router is set as my DNS server. There are the contents /etc/resolv.conf

# 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
# Generated by NetworkManager
nameserver 192.168.1.1
nameserver fe80::1%eth0

dig command shows ;; SERVER: 127.0.0.1#53(127.0.0.1) indicating it used dnsmasq for resolution but then what does dnsmasq use?

Note that name resolution is working just fine my questions are whether this setup would break with a reboot and whether IPv6 name resolution works at all. Thanks.

1

If your configuration is working at this moment, then even after your system restarts.

dnsmasq is configured by a configuration file with the name

/etc/dnsmasq.conf

and also /etc/hosts and /etc/resolv.conf are essential and all files in /etc/dnsmasq.d/ will be considered.

The IP address 127.0.1.1 is ok and, also as 127.0.0.1, your host or in other words, the localhost.

Without a modification in /etc/dnsmasq.conf, dnsmasq reads your /etc/resolv.conf and use your router (192.168.1.1 in your case) as nameserver.

Test it. Search the line

#no-resolv

in /etc/dnsmasq.conf and remove the #. Now restart dnsmasq

sudo systemctl restart dnsmasq

and try to ping google.com. It should fail, if there is no other nameserver defined in your /etc/dnsmasq.conf

  • I did what you said and restarted dnsmasq. Showing its log with service dnsmasq status it rightfully complains about ignoring resolv-file due to the flag and about no upstream servers configured. dig and nslookup return a REFUSED status but the system still resolves names. I pinged a website that I haven't visited before and it worked. Something funky is going on here. – user463204 Oct 24 '15 at 20:57
  • Yes, perhaps. And? – A.B. Oct 24 '15 at 21:38
  • I just don't like uncertainty. – user463204 Oct 24 '15 at 21:43
  • Read your question and read my answer. If you have further questions, ask new questions as new questions, but don't in the comments. – A.B. Oct 24 '15 at 21:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy