Comment 27 for bug 1778946

Revision history for this message
pdecat (pdecat) wrote :

I too have been facing this issue since a few releases, and still face it on Ubuntu 19.10 (resolvconf not installed as it causes other issues):

# sudo rm /run/systemd/resolve/stub-resolv.conf.tmp

# sudo systemctl restart NetworkManager

# ls -la /etc/resolv.conf /run/systemd/resolve/
lrwxrwxrwx 1 root root 39 Dec 23 16:31 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf

/run/systemd/resolve/:
total 8
drwxr-xr-x 3 systemd-resolve systemd-resolve 100 Jan 14 13:01 .
drwxr-xr-x 21 root root 480 Jan 14 06:59 ..
drwx------ 2 systemd-resolve systemd-resolve 60 Jan 14 13:01 netif
-rw-r--r-- 1 systemd-resolve systemd-resolve 613 Jan 14 13:01 resolv.conf
-rw-r--r-- 1 systemd-resolve systemd-resolve 731 Jan 14 13:01 stub-resolv.conf

# nmcli connection up vpn.mydomain.com
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/10)

# ls -la /etc/resolv.conf /run/systemd/resolve/
lrwxrwxrwx 1 root root 39 Dec 23 16:31 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf

/run/systemd/resolve/:
total 16
drwxr-xr-x 3 systemd-resolve systemd-resolve 140 Jan 14 13:01 .
drwxr-xr-x 21 root root 480 Jan 14 06:59 ..
drwx------ 2 systemd-resolve systemd-resolve 60 Jan 14 13:01 netif
-rw-r--r-- 1 systemd-resolve systemd-resolve 613 Jan 14 13:01 resolv.conf
-rw-r--r-- 1 systemd-resolve systemd-resolve 731 Jan 14 13:01 stub-resolv.conf
-rw------- 1 root root 731 Jan 14 13:01 stub-resolv.conf.pppd-backup.ppp0
-rw-r--r-- 1 root root 753 Jan 14 13:01 stub-resolv.conf.tmp

# nmcli connection down vpn.mydomain.com
Connection 'vpn.mydomain.com' successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/10)

# ls -la /etc/resolv.conf /run/systemd/resolve/
lrwxrwxrwx 1 root root 39 Dec 23 16:31 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf

/run/systemd/resolve/:
total 12
drwxr-xr-x 3 systemd-resolve systemd-resolve 120 Jan 14 13:02 .
drwxr-xr-x 21 root root 480 Jan 14 06:59 ..
drwx------ 2 systemd-resolve systemd-resolve 60 Jan 14 13:01 netif
-rw-r--r-- 1 systemd-resolve systemd-resolve 613 Jan 14 13:01 resolv.conf
-rw------- 1 root root 731 Jan 14 13:01 stub-resolv.conf
-rw-r--r-- 1 root root 753 Jan 14 13:01 stub-resolv.conf.tmp

# cat /etc/resolv.conf
cat: /etc/resolv.conf: Permission denied

# ping -c1 www.google.com
ping: www.google.com: Name or service not known

# sudo chmod a+r /etc/resolv.conf

# ping -c1 www.google.com
PING www.google.com (216.58.201.228) 56(84) bytes of data.
64 bytes from par10s33-in-f4.1e100.net (216.58.201.228): icmp_seq=1 ttl=56 time=4.52 ms

--- www.google.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 4.522/4.522/4.522/0.000 ms

My work-around is to disable both up and down 0000usepeerdns scripts:

# sudo dpkg-divert --divert /etc/ppp/ip-down.d/0000usepeerdns.bak --rename /etc/ppp/ip-down.d/0000usepeerdns

# sudo dpkg-divert --divert /etc/ppp/ip-up.d/0000usepeerdns.bak --rename /etc/ppp/ip-up.d/0000usepeerdns