[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
I concur with @tomasz-kontusz. This is a problem for users of network- manager-sstp. Attaching a patch that I've tested with network-manager- sstp ** Patch added: "missing nm-sstp-service-*, use nm-*-service-*" https://bugs.launchpad.net/ubuntu/+source/ppp/+bug/1778946/+attachment/5478517/+files/usepeerdns.patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ppp/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
The patch from #19 (which is now in Ubuntu) is not enough - there are still problems with network-manager-sstp, which calls pptp with "nm- sstp-service-*". If there's no better workaround, can the userpeerdns and 000resolveconf scripts at least bail on all "nm-*-service-*"? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ppp/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
The problem is still there on Ubuntu 18.04.4 LTS. The workaround from comment #30 works for me. $ apt show ppp Package: ppp Version: 2.4.7-2+4.1ubuntu5 Status: install ok installed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ppp/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
Ubuntu 18.04.4 LTS, same problem: DNS_PROBE_FINISHED_BAD_CONFIG after disconnecting from MS VPN. I can confirm that workaround by Marius Gedminas from comment #30 works as expected. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ppp/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
The workaround I now use is to modify the cp -a command in /etc/ppp/ip- up.d/usepeerdns to look like this: cp -a "$REALRESOLVCONF" "$REALRESOLVCONF.pppd-backup.$PPP_IFACE" || { rm -f "$REALRESOLVCONF.pppd-backup.$PPP_IFACE" "$REALRESOLVCONF.tmp" exit 1 } -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ppp/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
Unfortunately the fix doesn't work and Ubuntu 19.10 with ppp 2.4.7-2+4.1ubuntu4.1 is still affected. I've added a bunch of logger -t usepeerdns -- doing stuff commands to /etc/ppp/ip-up.d/usepeerdns and /etc/ppp/ip- down.d/usepeerdns. Here's what I see when /etc/resolv.conf is a symlink to /run/systemd/resolve/stub-resolv.conf (which is the standard Ubuntu configuration) and /run/systemd/resolve/stub-resolv.conf is owned by systemd-resolve:systemd-resolve: $ journalctl -b SYSLOG_IDENTIFIER=usepeerdns -f kov. 18 22:16:44 blynas usepeerdns[29590]: running /etc/ppp/ip-up.d/usepeerdns ppp0 0 10.46.37.85 192.0.2.1 7c4ea6b5-3f8b-4874-a81a-c4712fa17787 kov. 18 22:16:44 blynas usepeerdns[29592]: the real resolv.conf is /run/systemd/resolve/stub-resolv.conf kov. 18 22:16:44 blynas usepeerdns[29595]: created /run/systemd/resolve/stub-resolv.conf.tmp kov. 18 22:16:44 blynas usepeerdns[29597]: -rw-r--r-- 1 systemd-resolve systemd-resolve 719 Mar 18 22:16 /run/systemd/resolve/stub-resolv.conf -rw-r--r-- 1 root root749 Mar 18 22:16 /run/systemd/resolve/stub-resolv.conf.tmp This indicates that the script aborted early due to the `#!/bin/sh -e` shebang line, as I had more logging statements. The failing command must've been the cp -a. Disconnecting produces kov. 18 22:16:49 blynas usepeerdns[29785]: running /etc/ppp/ip-down.d/usepeerdns ppp0 0 10.46.37.85 192.0.2.1 7c4ea6b5-3f8b-4874-a81a-c4712fa17787 kov. 18 22:16:49 blynas usepeerdns[29791]: -rw-r--r-- 1 systemd-resolve systemd-resolve 719 Mar 18 22:16 /run/systemd/resolve/stub-resolv.conf -rw--- 1 root root719 Mar 18 22:16 /run/systemd/resolve/stub-resolv.conf.pppd-backup.ppp0 kov. 18 22:16:49 blynas usepeerdns[29797]: moved /run/systemd/resolve/stub-resolv.conf.pppd-backup.ppp0 to /run/systemd/resolve/stub-resolv.conf kov. 18 22:16:49 blynas usepeerdns[29803]: -rw--- 1 root root 719 Mar 18 22:16 /run/systemd/resolve/stub-resolv.conf kov. 18 22:16:49 blynas usepeerdns[29805]: all is well! Now if I apply a manual fix of the form sudo chmod a+r /etc/resolv.conf and then connect to the VPN again, I'll see that the script runs successfully to the end kov. 18 22:18:17 blynas usepeerdns[30617]: running /etc/ppp/ip-up.d/usepeerdns ppp0 0 10.46.37.85 192.0.2.1 7c4ea6b5-3f8b-4874-a81a-c4712fa17787 kov. 18 22:18:17 blynas usepeerdns[30619]: the real resolv.conf is /run/systemd/resolve/stub-resolv.conf kov. 18 22:18:17 blynas usepeerdns[30622]: created /run/systemd/resolve/stub-resolv.conf.tmp kov. 18 22:18:17 blynas usepeerdns[30627]: -rw-r--r-- 1 root root 719 Mar 18 22:16 /run/systemd/resolve/stub-resolv.conf -rw-r--r-- 1 root root 749 Mar 18 22:18 /run/systemd/resolve/stub-resolv.conf.tmp kov. 18 22:18:17 blynas usepeerdns[30636]: backed up /run/systemd/resolve/stub-resolv.conf to /run/systemd/resolve/stub-resolv.conf.pppd-backup.ppp0 kov. 18 22:18:17 blynas usepeerdns[30638]: -rw-r--r-- 1 root root 719 Mar 18 22:16 /run/systemd/resolve/stub-resolv.conf -rw-r--r-- 1 root root 719 Mar 18 22:16 /run/systemd/resolve/stub-resolv.conf.pppd-backup.ppp0 -rw-r--r-- 1 root root 749 Mar 18 22:18 /run/systemd/resolve/stub-resolv.conf.tmp kov. 18 22:18:17 blynas usepeerdns[30640]: moved /run/systemd/resolve/stub-resolv.conf.tmp to /run/systemd/resolve/stub-resolv.conf kov. 18 22:18:17 blynas usepeerdns[30643]: -rw-r--r-- 1 systemd-resolve systemd-resolve 719 Mar 18 22:18 /run/systemd/resolve/stub-resolv.conf -rw-r--r-- 1 root root719 Mar 18 22:16 /run/systemd/resolve/stub-resolv.conf.pppd-backup.ppp0 kov. 18 22:18:17 blynas usepeerdns[30644]: all is well! and when I disconnect, the bug is no longer showing up: kov. 18 22:18:38 blynas usepeerdns[30885]: running /etc/ppp/ip-down.d/usepeerdns ppp0 0 10.46.37.85 192.0.2.1 7c4ea6b5-3f8b-4874-a81a-c4712fa17787 kov. 18 22:18:38 blynas usepeerdns[30900]: -rw-r--r-- 1 systemd-resolve systemd-resolve 719 Mar 18 22:18 /run/systemd/resolve/stub-resolv.conf -rw-r--r-- 1 root root719 Mar 18 22:16 /run/systemd/resolve/stub-resolv.conf.pppd-backup.ppp0 kov. 18 22:18:38 blynas usepeerdns[30905]: moved /run/systemd/resolve/stub-resolv.conf.pppd-backup.ppp0 to /run/systemd/resolve/stub-resolv.conf kov. 18 22:18:38 blynas usepeerdns[30907]: -rw-r--r-- 1 root root 719 Mar 18 22:16 /run/systemd/resolve/stub-resolv.conf kov. 18 22:18:38 blynas usepeerdns[30908]: all is well! The only difference is the ownership of /run/systemd/resolve/stub-reso
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
Will this get backported to Bionic please? Or do we have to wait for the 20.4 LTS release? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ppp/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
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 rootroot 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 rootroot480 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 rootroot 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 rootroot480 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 rootroot731 Jan 14 13:01 stub-resolv.conf.pppd-backup.ppp0 -rw-r--r-- 1 rootroot753 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 rootroot 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 rootroot480 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 rootroot731 Jan 14 13:01 stub-resolv.conf -rw-r--r-- 1 rootroot753 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 usepeerdns scripts: # sudo dpkg-divert --divert /etc/ppp/ip-down.d/usepeerdns.bak --rename /etc/ppp/ip-down.d/usepeerdns # sudo dpkg-divert --divert /etc/ppp/ip-up.d/usepeerdns.bak --rename /etc/ppp/ip-up.d/usepeerdns -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ppp/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
Can confirm. Work-around is to turn off WiFi and re-enable it. Distributor ID: Ubuntu Description:Ubuntu 18.04.3 LTS Release:18.04 Codename: bionic -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ppp/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
This bug was fixed in the package ppp - 2.4.7-2+4.1ubuntu2 --- ppp (2.4.7-2+4.1ubuntu2) eoan; urgency=medium * debian/extra/ip-up.d/usepeerdns: Added NetworkManager check, which lets the script exit when NetworkManager is in use (LP: #1778946). -- Till Kamppeter Fri, 08 Feb 2019 17:37:29 +0100 ** Changed in: ppp (Ubuntu) Status: In Progress => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ppp/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
Uploaded to Eoan. If this needs to be SRUed, please adjust the bug description to follow the template: https://wiki.ubuntu.com/StableReleaseUpdates#SRU_Bug_Template Thanks! ** Changed in: ppp (Ubuntu) Status: Confirmed => In Progress -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ppp/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
I've manually applied the patch proposed in comment #22 to my Ubuntu 18.10 desktop, and I can confirm that it fixes the issue for me. I haven't seen any regression either, although my testing has been very limited so far. I've been experiencing this bug ever since Ubuntu 18.04 when disconnecting from my employer's Fortinet SSLVPN (I'm using the network- manager-fortisslvpn package). My previous workaround was to force my wifi up again (even if it was not down) after closing the VPN connection (nmcli c up $my-ssid). -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ppp/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
** Changed in: ppp (Debian) Status: Unknown => New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ppp/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
** Bug watch removed: GNOME Bug Tracker #785771 https://gitlab.gnome.org/785771 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ppp/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
** Also affects: ppp (Debian) via https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=378363 Importance: Unknown Status: Unknown ** Changed in: ppp (Ubuntu) Importance: Undecided => Medium ** No longer affects: network-manager (Ubuntu) ** No longer affects: resolvconf (Ubuntu) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ppp/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
Attached is the debdiff with the proposed fix of comment #19 applied. Someone with appropriate upload rights to Disco, please upload it. I could not actually test it as I have no access to a Microsoft VPN, I do not see any regression though. I can access Canonical's VPNs and while having activated one and also after deactivating it I always have DNS correctly working. To the original poster: As soon as this is in Disco (or building the fixed package by yourself) please test whether this helps. If the fixed package does not solve your problem, we will try the proposed "cp -a ..." fixes. ** Patch added: "ppp_2.4.7-2+4ubuntu3_2.4.7-2+4ubuntu4.debdiff" https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946/+attachment/5237098/+files/ppp_2.4.7-2+4ubuntu3_2.4.7-2+4ubuntu4.debdiff ** Tags added: patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
As I see the comments here, the fix is to modify the file /etc/ppp/ip- up.d/usepeerdns according to comments #17 and #19. /etc/ppp/ip- up.d/usepeerdns is part of the ppp package, so the bug needs to be fixed in the ppp package. ** Changed in: network-manager (Ubuntu) Status: Confirmed => Invalid ** Changed in: resolvconf (Ubuntu) Status: Confirmed => Invalid -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
Although this problem is easy to fix once you know what to do, I don't know if it should be only "Medium" importance because the impact is massive: no DNS is available. If you're not technically inclined enough to know to go poking around /etc/resolv.conf if DNS breaks, you would never be able to figure out what was wrong with your system and you can't search the internet to find a solution... -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
** Changed in: network-manager (Ubuntu) Assignee: (unassigned) => Till Kamppeter (till-kamppeter) ** Changed in: network-manager (Ubuntu) Importance: Undecided => Medium -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
Comment 6 and 7 in the upstream GNOME NetworkManager-pptp bug report : https://bugzilla.gnome.org/show_bug.cgi?id=785771#c6 are relevant to this bug (but not the 'cp -a' issue). As mentioned, the following exit in /etc/ppp/ip-up.d/000resolvconf when the interface is managed by NM, seems the right solution. case "$6" in nm-pptp-service-*|nm-l2tp-service-*|/org/freedesktop/NetworkManager/PPP/*) # NetworkManager handles it exit 0 ;; esac Perhaps the exit should be added to /etc/ppp/ip-up.d/usepeerdns for instances when resolvconf package isn't installed? ** Bug watch added: GNOME Bug Tracker #785771 https://bugzilla.gnome.org/show_bug.cgi?id=785771 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
I wasn't able to redirect the stderr from the following line in /etc/ppp /ip-up.d/usepeerdns (probably because of something pppd is doing) : cp -a "$REALRESOLVCONF" "$REALRESOLVCONF.pppd-backup.$PPP_IFACE" So I modified the cp.c source from the coreutils package and redirected stderr to a file. The error message I now see is : cp: failed to preserve ownership for '/run/systemd/resolve/stub-resolv.conf.pppd-backup.ppp0': Operation not permitted cp.c is using the lchown() function which is failing with that message. Looks like only preserving ownership is failing as I tried the following and it works: cp --preserve=mode,timestamps "$REALRESOLVCONF" "$REALRESOLVCONF.pppd- backup.$PPP_IFACE" The way /run is mounted might be the reason why 'cp -a' and lchown() is failing. Ignore what I said able $? being 0 after the cp -a line. Doing the following line confirms $? is 1 : cp -a "$REALRESOLVCONF" "$REALRESOLVCONF.pppd-backup.$PPP_IFACE" || echo ERROR $? >> /tmp/usepeerdns-up.log -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
Sorry ignore comment #16 as the following line in /etc/ppp/ip- up.d/usepeerdns will exit because of the '#!/bin/sh -e' shebang line: cp -Lp "$REALRESOLVCONF" "$REALRESOLVCONF.pppd-backup.$PPP_IFACE" So my original suggestion of replacing the following line: cp -a "$REALRESOLVCONF" "$REALRESOLVCONF.pppd-backup.$PPP_IFACE" to: cp "$REALRESOLVCONF" "$REALRESOLVCONF.pppd-backup.$PPP_IFACE" chmod 644 "$REALRESOLVCONF.pppd-backup.$PPP_IFACE" was correct and won't prematurely exit. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
Correction the following line in /etc/ppp/ip-up.d/usepeerdns probably should be changed from : cp -a "$REALRESOLVCONF" "$REALRESOLVCONF.pppd-backup.$PPP_IFACE" to: cp -Lp "$REALRESOLVCONF" "$REALRESOLVCONF.pppd-backup.$PPP_IFACE" chmod 644 "$REALRESOLVCONF.pppd-backup.$PPP_IFACE" -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
I can confirm the issue is the following line in /etc/ppp/ip- up.d/usepeerdns as previously mentioned : cp -a "$REALRESOLVCONF" "$REALRESOLVCONF.pppd-backup.$PPP_IFACE" The variable expansion of that line is : cp -a /run/systemd/resolve/stub-resolv.conf /run/systemd/resolve/stub-resolv.conf.pppd-backup.ppp0 I had to modify the shebang line of that script from : #!/bin/sh -e to : #!/bin/sh to get past that line and output debugging output I inserted, which included : ls -l /run/systemd/resolve/stub-resolv.conf -rw-r--r-- 1 systemd-resolve systemd-resolve 720 Jan 17 21:47 /run/systemd/resolve/stub-resolv.conf ls -l /run/systemd/resolve/stub-resolv.conf.pppd-backup.ppp0 -rw--- 1 root root 720 Jan 17 21:47 /run/systemd/resolve/stub-resolv.conf.pppd-backup.ppp0 So 'cp -a' isn't copying the permissions. Oddly, $? is 0 after running that 'cp -a' line, therefor seems correct, also umask is 0022, so I'm not sure what is going wrong. Anyway a fix seems to be to change the following line in /etc/ppp/ip-up.d/usepeerdns from : cp -a "$REALRESOLVCONF" "$REALRESOLVCONF.pppd-backup.$PPP_IFACE" to: cp "$REALRESOLVCONF" "$REALRESOLVCONF.pppd-backup.$PPP_IFACE" chmod 644 "$REALRESOLVCONF.pppd-backup.$PPP_IFACE" For Ubuntu 18.04 setups that have the pppconfig package installed, the following lines in /etc/ppp/ip-up.d/0dns-up probably should be changed from : /bin/cp -Lp "$RESOLVCONF" "$RESOLVBAK" || exit 1 /bin/cp -Lp "$TEMPRESOLV" "$RESOLVCONF" || exit 1 chmod 644 "$RESOLVCONF" || exit 1 to: /bin/cp -Lp "$RESOLVCONF" "$RESOLVBAK" || exit 1 chmod 644 "$RESOLVBAK" || exit 1 /bin/cp -Lp "$TEMPRESOLV" "$RESOLVCONF" || exit 1 chmod 644 "$RESOLVCONF" || exit 1 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
Sorry for the delay here. Is this what you were interested in @cyphermox? While VPN is up: $ ls -lha /run/systemd/resolve/ total 16K drwxr-xr-x 3 systemd-resolve systemd-resolve 140 Nov 28 12:29 . drwxr-xr-x 20 rootroot460 Nov 28 12:28 .. drwx-- 2 systemd-resolve systemd-resolve 80 Nov 28 12:29 netif -rw-r--r-- 1 systemd-resolve systemd-resolve 647 Nov 28 12:29 resolv.conf -rw-r--r-- 1 systemd-resolve systemd-resolve 712 Nov 28 12:29 stub-resolv.conf -rw--- 1 rootroot712 Nov 28 12:27 stub-resolv.conf.pppd-backup.ppp0 -rw-r--r-- 1 rootroot728 Nov 28 12:29 stub-resolv.conf.tmp After VPN is closed: $ ls -lha /run/systemd/resolve/ total 12K drwxr-xr-x 3 systemd-resolve systemd-resolve 120 Nov 28 12:32 . drwxr-xr-x 20 rootroot460 Nov 28 12:28 .. drwx-- 2 systemd-resolve systemd-resolve 60 Nov 28 12:32 netif -rw-r--r-- 1 systemd-resolve systemd-resolve 647 Nov 28 12:32 resolv.conf -rw--- 1 rootroot712 Nov 28 12:27 stub-resolv.conf -rw-r--r-- 1 rootroot728 Nov 28 12:29 stub-resolv.conf.tmp Attached are the files after the VPN is shutdown. ** Attachment added: "systemd_resolve.tgz" https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946/+attachment/5216985/+files/systemd_resolve.tgz -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: resolvconf (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: ppp (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
tagging as rls-cc-notfixing, while good to fix it impacts a non default plugin and we don't think it's important enough to be actively tracked by desktop ** Tags removed: rls-cc-incoming ** Tags added: rls-cc-notfixing -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
cp -a is supposed to preserve ownership. -a means "-dR --preserve=all". Could someone look at what happens, by displaying more than just the /run/systemd/resolve/stub-resolv.conf file? All files in /run/systemd/resolve/ are relevant here. This has more smells of being affected my UMASK and probably other settings, otherwise it wouldn't be a perm 600 file. Nevertheless, running usepeerdns is wrong in all cases, especially with NetworkManager. That file probably should go; replaced by something that will use systemd-resolved's interfaces instead if they are available, and definitely never runs when NetworkManager is running. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
Also confirming that installing resolvconf makes DNS work once the VPN is disconnected. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
Installing resolveconf fixed it for me, now DNS resolv works after PPTP disconnects. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
I spoke to stgraber a bit, he said that the resolvconf thing is probably a red herring. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
This upstream bug suggests that the problem can be resolved by installing resolvconf: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=378363 I will test this, but I'm having problems with VPNs on this network atm. ** Bug watch added: Debian Bug tracker #378363 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=378363 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
It would be a bug in "ppp" which provides that file then and worth reporting to Debian because it's coming from there directly -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
** Tags added: rls-cc-incoming -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
** Also affects: resolvconf (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
** Also affects: ppp (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
** Also affects: openvpn-systemd-resolved (Ubuntu) Importance: Undecided Status: New ** No longer affects: openvpn-systemd-resolved (Ubuntu) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
seems related to the file /etc/ppp/ip-up.d/usepeerdns on line 23-24 cp -a "$REALRESOLVCONF" "$REALRESOLVCONF.pppd-backup.$PPP_IFACE" mv -f "$REALRESOLVCONF.tmp" "$REALRESOLVCONF" the cp command doesn't preserve file ownership -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: network-manager (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1778946] Re: No dns resolution after closing a vpn/pptp connection
Before start pptp vpn: $ ls -laF /run/systemd/resolve/stub-resolv.conf -rw-r--r-- 1 systemd-resolve systemd-resolve 714 jun 30 18:26 /run/systemd/resolve/stub-resolv.conf After start pptp vpn: $ ls -laF /run/systemd/resolve/stub-resolv.conf -rw-r--r-- 1 systemd-resolve systemd-resolve 714 jun 30 18:26 /run/systemd/resolve/stub-resolv.conf After stop pptp vpn: $ ls -laF /run/systemd/resolve/stub-resolv.conf -rw--- 1 root root 714 jun 30 18:26 /run/systemd/resolve/stub-resolv.conf File /run/systemd/resolve/stub-resolv.conf is readable only for root user. And DNS is accessible only for root user. $ ping google.com ping: google.com: Temporary failure in name resolution $ sudo ping google.com PING google.com (172.217.169.110) 56(84) bytes of data. 64 bytes from sof02s31-in-f14.1e100.net (172.217.169.110): icmp_seq=1 ttl=55 time=0.999 ms .. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1778946 Title: No dns resolution after closing a vpn/pptp connection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs