Comment 8 for bug 1774632

Revision history for this message
Zhuokun Yang (jasdenty) wrote (last edit ):

OS: Ubuntu 18.04 bionic
Kernel: x86_64 Linux 4.19.17

For those who encounter situations otherwise, here is my case and workarounds.

my case:
---
 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf

I remove the symlink and assign a new one
 /etc/resolv.conf -> /run/systemd/resolve/resolv.conf
reboot, and the /etc/resolv.conf says there is NO DNS SERVER. DNS Lookup is completeny unusable at this point.

If it points to the stub-resolv.conf variant, it seems that the systemd-resolved is not working properly, at 127.0.0.53.
---

my solution:
---
1. remove the symlink,
2. replace it with a solid file, either empty or with a line `nameserver 8.8.8.8`
3. reboot

and what you will see is a autogenerated resolv.conf made by NetworkManager, which changes dynaminally depending on what network you are connected to.

using netstat -tunlp to grep the nameserver in the file, you may see
```
tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN 1604/dnsmasq
udp 0 0 127.0.1.1:53 0.0.0.0:* 1604/dnsmasq
```
which is also recommended in a lot of threads in askubuntu (i.e. google enable dns cache in ubuntu).
---