3

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 8.8.8.8 works, but

nslookup google.com
;; Got SERVFAIL reply from 127.0.0.53, 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 8.8.8.8 in /etc/resolvconf/resolv.conf.d/tail):

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.

nameserver 127.0.0.53
search station
nameserver 8.8.8.8
Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227
Mabri
  • 111
  • 2
  • 10
  • 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
    127.0.0.53 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

1 Answers1

2

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
Mabri
  • 111
  • 2
  • 10