Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Yesterday I upgraded to Precise and dnsmasq stopped working. That is, DNS queries to localhost were dnsmasq is listening (127.0.0.1) were refused.

Removing resolvconf (apt-get remove resolvconf) and rebooting solved the issue (found that suggestion somewhere on Google). /etc/resolv.conf looked fine with and without resolvconf in place. No difference at all.

  1. Why would I use resolvconf? Are there any benefits? The Wikipedia article covering resolvconf sucks.
  2. Why did resolvconf interfere with dnsmasq? Is this a known issue?
share|improve this question
Instead of Googling for the answer, why not read resolvconf(8) and the package README /usr/share/doc/resolvconf/README.gz? – jdthood Oct 28 '12 at 19:33
bla@blubb:~$ [ -f /usr/share/doc/resolvconf/README.gz ] && echo "Found" || echo "Not found" Not Found um. smartass. – lightxx Nov 15 '12 at 13:52
The file is included in the resolvconf package, bonehead. – jdthood Nov 17 '12 at 19:26

4 Answers

The simple answer to (1) is: resolvconf sets itself up as the intermediary between programs that supply this information (such as ifup and ifdown, DHCP clients, the PPP daemon and local name servers) and programs that use this information (such as DNS caches and resolver libraries). As of Ubuntu 12.04 resolvconf is part of the default installation in both the server and desktop variants. It is never necessary to remove resolvconf and people who do remove it usually don't understand it, generally because they haven't read resolvconf(8) and /usr/share/doc/resolvconf/README.gz.

The answer to the second question is that resolvconf most probably did not interfere with dnsmasq. My guess is that you were running into bug #959037.

Explanation: In Ubuntu 12.04 there are two ways in which dnsmasq gets run. There is the traditional standalone version of dnsmasq which listens on all addresses. And there is the new NetworkManager-controlled dnsmasq process which listens only on 127.0.0.1. The latter conflicts with the former unless the former is reconfigured. This problem was solved in Ubuntu 12.10 by having the NM-controlled dnsmasq process listen on 127.0.1.1 instead of 127.0.0.1 and by forcing the standalone dnsmasq process to listen only on addresses assigned to interfaces.

share|improve this answer

I've just removed it on my install. I was using pppd manually to dial my 3G modem connection and resolvconf interfered with my dns settings by automatically adding my provider DNS when I wanted to use custom DNS. pppd has options to control this but resolvconf clobbered them with its own settings. I would also like to know answer to this question? It seems like this is some make-it-easier-but-instead-complicate-things kind of package?

p.s. I've found this bug report: https://bugs.launchpad.net/ubuntu/+source/resolvconf/+bug/922578

share|improve this answer
thanks for your input. i'd have upvoted it but i'm lacking the rep. – lightxx May 8 '12 at 5:16
@lightxx: Upvoted for you ;) – Tomasz Zieliński Jul 22 '12 at 1:41
Instead of removing resolvconf you could have configured resolvconf to ignore nameserver information coming from pppd. – jdthood Oct 28 '12 at 19:36

The simple answer to (1) is: resolvconf sets itself up as the intermediary between programs that supply this information (such as ifup and ifdown, DHCP clients, the PPP daemon and local name servers) and programs that use this information (such as DNS caches and resolver libraries).

That's from the package description. On desktops, it works in conjunction with NetworkManager to handle making and dropping connections smoothly.

So resolvconf, along with dnsmasq, are used in 12.04 to make the DNS info handling more reliable on the desktop version. So in some situations, it does make things better, but the whole situation lacks the documentation in the right place, esp. in the server world.

Despite loads of Googling, I haven't been able to ascertain what is recommended on a server installation.

As far as (2) goes, you're having the opposite problem from me. Dnsmasq works well with resolvconf on my machine and updates the /etc/resolv.conf file to contain 127.0.0.1 but has other problems because dnsmasq doesn't get the ISP name servers from dhclient on eth0 (this is a gateway) nor does it get the name servers I manually entered in the eth0 stanza in /etc/network/interfaces.

Why do you use dnsmasq? Are you also running a gateway with 2 nics? Or is it just a plain desktop? If so, resolvconf co-ordinates with network-manager

share|improve this answer
thanks for your answer. i would have upvoted it, unfortunately you need 15 reputation to upvote. lol – lightxx Aug 25 '12 at 7:22
Re: "Despite loads of Googling". How about reading resolvconf(8) and /usr/share/doc/resolvconf/README.gz? – jdthood Oct 28 '12 at 19:39

"How about reading resolvconf(8) and /usr/share/doc/resolvconf/README.gz?"

I would, if they existed on any of my systems.

$man resolvconf No manual entry for resolvconf $file /usr/share/doc/resolvconf/README.gz /usr/share/doc/resolvconf/README.gz: ERROR: cannot open `/usr/share/doc/resolvconf/README.gz' (No such file or directory) $

11.04, 11.10, and 12.04 - Server version. Default installs. Still unsure why resolvconf is necessary on a server variant, but I digress.

Point is, answers just telling people to read manpages are rarely helpful and only adding to the noise.

share|improve this answer
3  
"Point is, answers just telling people to read manpages are rarely helpful and only adding to the noise." I couldn't agree more – lightxx Nov 15 '12 at 8:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.