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). 
---

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1774632

Title:
  The symbolic link /etc/resolv.conf points to the wrong file by default

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1774632/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to