Yesterday I upgraded to Precise and dnsmasq stopped working. That is, DNS queries to localhost where dnsmasq is listening ( 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?
  • bla@blubb:~$ [ -f /usr/share/doc/resolvconf/README.gz ] && echo "Found" || echo "Not found" Not Found um. smartass.
    – lightxx
    Nov 15, 2012 at 13:52

3 Answers 3


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 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 instead of and by forcing the standalone dnsmasq process to listen only on addresses assigned to interfaces.

  • I've read the manapage and still can't find a reliable way to prepend my own nameservers to resolv.conf. Jun 21, 2013 at 1:19
  • With resolvconf installed you can prepend a nameserver address by putting nameserver x.x.x.x in /etc/resolvconf/resolv.conf.d/head. Be advised, however, that this is generally not necessary or recommended. Generally there is a more correct way to add "nameserver" lines to resolv.conf. Generally the utility that configures a network interface adds or removes the nameserver addresses available via that interface by running resolvconf -a or resolvconf -d, respectively. Prioritization of nameserver addresses added in this way is governed by /etc/resolvconf/interface-order.
    – jdthood
    Jun 21, 2013 at 8:42
  • Actually, putting a nameserver line in head added it AFTER the default nameserver. Jun 21, 2013 at 15:27
  • I haven't tested it, but it seems like echo x.x.x.x | resolvconf -a lo would do the trick for adding a nameserver which I'd like to be first for all interfaces. Jun 21, 2013 at 15:42
  • Resolvconf always puts the contents of head at the head (top, beginning) of resolv.conf.
    – jdthood
    Jun 22, 2013 at 15:51

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

  • thanks for your input. i'd have upvoted it but i'm lacking the rep.
    – lightxx
    May 8, 2012 at 5:16
  • @lightxx: Upvoted for you ;) Jul 22, 2012 at 1:41
  • Instead of removing resolvconf you could have configured resolvconf to ignore nameserver information coming from pppd.
    – jdthood
    Oct 28, 2012 at 19:36
  • The normal contents of resolv.conf is quite simple. Whenever the machine is a server or even a non-laptop work station, it seems obviously easier to track the single resolv.conf instead of the half dozen different files potentially utilized by resolvconf .
    – ericx
    Sep 19, 2016 at 17:16
  • @jdthood - i dont see how do do this in the resolvconf.conf man page, I'd be interested in implementation specifics.
    – a2f0
    Oct 26, 2017 at 1:09

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 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

  • thanks for your answer. i would have upvoted it, unfortunately you need 15 reputation to upvote. lol
    – lightxx
    Aug 25, 2012 at 7:22
  • 1
    man pages are great when you know what you need to know. If you don't, they can be puzzling to say the least. Howto's, examples and faqs are what you need when you don't have experience in an area.
    – Adam
    Jun 29, 2013 at 14:47
  • upvoted @lightxx on your behalf :)
    – fkl
    Jan 7, 2015 at 21:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .