I'm having DNS resolution issues in various contexts which appear to trace back to my networking configuration.

I'm running just the dnsmasq-base installation of dnsmasq on two Linux installations (Lubuntu 12.04 and 12.10). I haven't done anything in particular to configure dnsmasq, but I think some other changes I made previously may have lead to an incorrect configuration when upgrading.

The working configuration on machine 'A' running 12.04 sets /etc/resolv.conf to use (which in /etc/hosts is set to $HOSTNAME) On machine 'B' where certain applications such as OpenVPN experience DNS resolution issues, /etc/resolv.conf is set to, which is my gateway IP. Only certain applications are affected. Web-browsing, for example, works just fine.

Any idea if this difference is the cause of the DNS resolution issues, and why 'B' is behaving differently?


Both 'A' and 'B' are running dnsmasq, both are using DHCP to get DNS configuration, and I'm only using dnsmasq for DNS.

There is no /etc/dnsmasq.conf file. I understand that this is normal when running just dnsmasq-base.

The contents of /etc/resolvconf on the two machines appear to be identical. No extraneous/missing files.

Sorry I can't be more specific about the nature of the problem. "DNS resolution issue" was the end-point of my discussion with technical support at my VPN provider.

  • If browsing works DNS can't be the problem. No matter what service is querying the nameserver, they do it in the same manner. Are both A and B using DHCP to get their network configured? – tink May 5 '13 at 20:35
  • On which machine, 'A' or 'B', does dnsmasq run? Does dnsmasq do DHCP as well as DNS? What is the value of the "resolv-file" parameter in dnsmasq.conf? – Bruce Ediger May 5 '13 at 20:36
  • Yes, it is unbelievable that the commercial (!) makes of Ubuntu would do that to their distribution, but they messed up their DNS. Check your machine B for files in /etc/resolvconf/ and see if any appears like it may be causing your problem. – Bananguin May 5 '13 at 21:14
  • 1
    dnsmasq is considered to be a bug by some sysadmins and you don't need it. It adds one more level of indirection in what is already a torturous resolution chain. You can kill the process with no visible adverse effect and may want to disable it permanently. dhclient will fill all your DHCP needs. – msw May 6 '13 at 0:00

On machine B, if /etc/NetworkManager/NetworkManager.conf contains dns=dnsmasq then resolv.conf should contain only one "nameserver" line, namely nameserver is the address where the NetworkManager-controlled local forwarding nameserver listens. NetworkManager gives that nameserver forwarding addresses to use.

Try running sudo dpkg-reconfigure resolvconf on machine B. This will restore the needed symbolic link from /etc/resolv.conf to ../run/resolvconf/resolv.conf.

Are you running a third-party VPN client? Such clients are known to clobber /etc/resolv.conf and not to restore it when they exit. You may have to do sudo dpkg-reconfigure resolvconf every time you stop such a client.

Another thing to try is: comment out dns=dnsmasq in /etc/NetworkManager/NetworkManager.conf and then reboot. This disables the NetworkManager-controlled local forwarding nameserver which has some known issues.

Your Answer

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

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