I'm having DNS problems with one WiFi network which I've been using for a long time. I tried to do an hotspot with my phone and everything worked as normal, so the issue is only on that network.
ping works, but

nslookup google.com
;; Got SERVFAIL reply from, trying next server
;; connection timed out; no servers could be reached

I've tried to install resolvconf and other solutions found online but none of them worked.

This is the content of /etc/resolv.conf (after adding nameserver in /etc/resolvconf/resolv.conf.d/tail):

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.

search station
  • Are you using NetworkManager to configure the network on your system? It could be an issue with the DHCP service not providing correct DNS information. – 0xSheepdog Jun 13 '19 at 16:17
  • Does sudo apt-get install dnsmasq solve the problem? – Rui F Ribeiro Jun 13 '19 at 16:33
  • Thanks! Your comment helped me to find a solution. I added dns=dnsmasq to /etc/NetworkManager/NetworkManager.conf and now it works. But, just out of curiosity, do you know what could have caused this issue? I'm wondering because I've been using this network for quite a while – Mabri Jun 13 '19 at 16:33
  • 2 is an address of your machine and not of the network, maybe a security update or package installation put it out of work. I would advise writing your own answer in the answer field and accepting it in two days. I usually prefer to unistall resolvconf in my machines. – Rui F Ribeiro Jun 13 '19 at 16:35

The solution I found was to

  1. Make sure Dnsmasq is installed (sudo apt-get install dnsmasq)
  2. add dns=dnsmasq in the [main] section of /etc/NetworkManager/NetworkManager.conf

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.