I have an Ubuntu 14.04 host and have a 15.10 server running in virtualbox. This is all a fresh install that I completed 3 days ago.

When I logged in last night to run "apt-get update", nothing resolved.

I'm attempting to use my router as the DNS server server. That's how I have the rest of my LAN setup. I can resolve successfully from the host, but I cannot resolve anything from the guest.

 source /etc/network/interfaces.d/*

 # The loopback network interface
 auto lo
 iface lo inet loopback

 # The primary network interface
 auto enp0s3
 iface enp0s3 inet static

I can ping my router. If I change the dns-nameservers to and restart networking, I still can't resolve google.com. There's something on the box that's preventing DNS queries from resolving and I'm not sure what could cause it. Thanks for the help.

  • Any firewall/iptable rules? Just in case? Can you tell us result of "telnet 53" from your guest system and also from your supervisor system? Just for a starter. – Jacek Jan 13 '16 at 16:14
  • Also - are you absolutely sure, that your supervisor system is also using as DNS? Is DNS working fine on that IP, for sure? – Jacek Jan 13 '16 at 16:16
  • I personally did not setup any firewall/iptable rules. In fact, I have to lookup how to check that to confirm. I wouldn't even know how to enter them to begin with. When I telnet to the router it says it's connected. I can't interact with it at all, it just goes to the next line when I send a command. Same from host system as well. Yes, the host is using as DNS. When I do a dig though, it's querying itself ( – LineNoise Jan 13 '16 at 23:40
  • 'linenoise@servermoo:~$ sudo iptables -L [sudo] password for linenoise: Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination linenoise@servermoo:~$' (all blank, that did not copy gracefully at all and I can't get the 'code' tag to work here) – LineNoise Jan 13 '16 at 23:45
  • Well - to be honest, if you say telnet to port 53 works from both host/hypervisor and guest - maybe there's something in the configuration that makes dns not respond to the guest with the proper answer. I'm afraid that I can be only guessing here. You have to check things carefully on your system. – Jacek Jan 14 '16 at 9:02

the same thing going on here I think it is something related to DNSMASQ some times dns resolution never works ,some times it works slowly taking for each name about 3 seconds to resolv ,and sometimes it runs really fast as it should be . I'm running ubuntu 15.10 and yes I tried to change dns servers to my ISP,Goolge,and opendns nothing seems to be stable

UPDATE: I think I found the solution


The problem seems to be related to the conflicting dnsmasq and resolvconf packages. Until 12.10, dnsmasq was used. From 13.04 onwards, Ubuntu seemed to switch to a dnsmasq/resolvconf hybrid, where you have installed the packages dnsmasq-base and resolvconf, but not dnsmasq itself.

I can't say if it's a bug in the upgrade scripts for 13.04 or something else, because when upgrading (as in fresh installs) resolvconf is installed, dnsmasq-base is upgraded and dnsmasq is (correctly) uninstalled.

The catch is, the upgrade script fails to comment out the dns=dnsmasq line in /etc/NetworkManager/NetworkManager.conf. So, even though the dnsmasq daemon is not present anymore on the system, /etc/resolv.conf still expects it to be.

SO to fix the problem edit this file /etc/NetworkManager/NetworkManager.conf and comment this line : #dns=dnsmasq

hope this helps some one

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.