VPN's DNS entries persist after disconnecting from VPN
When I connect to a openvpn server via NetworkManager-openvpn (both through the GUI and via nmcli con up id vpnname
), systemd-resolved
applies the VPN server's DNS entries correctly and they're visible in the stub at /etc/resolvd.conf
. However, when I disconnect from the VPN server, the DNS entries are not removed from /etc/resolvd.conf
. The result is that there's a long hang while the DNS query times out and then moves on to the next entry. Restarting systemd-resolved
fixes the issue, but is a pain to have to do every time I disconnect from the VPN.
(This is on Ubuntu 19.04, with GNOME 3.32.2 and network-manager-openvpn 1.8.10-1)
Log lines of relevance:
systemd[1]: Starting Network Manager Script Dispatcher Service...
NetworkManager[1638]: <info> [1570701690.7200] vpn-connection[[UUID stuff]13c150,cde86851-d149-4379-b59e-8b256d17a106,"VpnName",0]: VPN plugin: state changed: stopping (5)
NetworkManager[1638]: <info> [1570701690.7201] vpn-connection[[UUID stuff]13c150,cde86851-d149-4379-b59e-8b256d17a106,"VpnName",0]: VPN plugin: state changed: stopped (6)
systemd[1]: resolvconf-pull-resolved.service: Succeeded.
systemd[1]: Started resolvconf-pull-resolved.service.
NetworkManager[1638]: <warn> [1570701690.7365] dns-sd-resolved[[UUID stuff]063840]: Failed: GDBus.Error:org.freedesktop.resolve1.NoSuchLink: Link 24 not known
gnome-shell[2115]: Removing a network device that was not added
NetworkManager[1638]: <warn> [1570701690.7393] dns-sd-resolved[[UUID stuff]063840]: Failed: GDBus.Error:org.freedesktop.resolve1.NoSuchLink: Link 24 not known
gnome-shell[2115]: JS ERROR: TypeError: connectionSettings is null#012_updateConnection@resource:///org/gnome/shell/ui/status/network.js:1911:9
kdeconnectd.desktop[1334]: "No such interface “org.freedesktop.DBus.Properties” on object at path /org/freedesktop/NetworkManager/ActiveConnection/50"
org.keepassxc.KeePassXC.desktop[999]: "No such interface “org.freedesktop.DBus.Properties” on object at path /org/freedesktop/NetworkManager/ActiveConnection/50"
NetworkManager[1638]: <warn> [1570701690.7399] dns-sd-resolved[[UUID stuff]063840]: Failed: GDBus.Error:org.freedesktop.resolve1.NoSuchLink: Link 24 not known
NetworkManager[1638]: <warn> [1570701690.7401] dns-sd-resolved[[UUID stuff]063840]: Failed: GDBus.Error:org.freedesktop.resolve1.NoSuchLink: Link 24 not known
dbus-daemon[1637]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
systemd[1]: Started Network Manager Script Dispatcher Service.
kdeconnectd.desktop[1334]: "No such interface “org.freedesktop.DBus.Properties” on object at path /org/freedesktop/NetworkManager/ActiveConnection/50"
nm-dispatcher: req:1 'vpn-down' [tun0]: new request (1 scripts)
nm-dispatcher: req:1 'vpn-down' [tun0]: start running ordered scripts...
nm-dispatcher: req:2 'down' [tun0]: new request (1 scripts)
gnome-shell[999]: Removing a network device that was not added
gnome-shell[999]: JS ERROR: TypeError: connectionSettings is null#012_updateConnection@resource:///org/gnome/shell/ui/status/network.js:1911:9
nm-openvpn[1105]: SIGTERM[hard,] received, process exiting
nm-dispatcher: req:2 'down' [tun0]: start running ordered scripts...
systemd[1]: NetworkManager-dispatcher.service: Succeeded.