protonvpn-cli icon indicating copy to clipboard operation
protonvpn-cli copied to clipboard

resolvconf is leaking tun0 dns server settings

Open doxylabs opened this issue 4 years ago • 0 comments

...into non-vpn environment. This slows DNS while trying to query 10.8.8.1 on the internet. This patch removes the offending resolvconf setting after killing openvpn on Ubuntu 16.04.

This manifests when the network interface goes down/up after disconnecting protonvpn.

I have only tested this on Ubuntu 16.04, thus the os-release sourcing and version checking. This patch might not be needed on systems that are not running resolvconf with NetworkManager or other systems.

While debugging I saw that resolvconf is run multiple times with NetworkManager settings to rebuild resolv.conf when the interface comes up after sleep. The tun0 settings that OpenVPN creates (/run/resolvconf/interface/tun0.openvpn) get caught up in the resolv.conf rebuild.

This issue doesn't show up immediately after protonvpn disconnect as protonvpn_cli is doing that clever caching of resolv.conf.

doxylabs avatar Sep 27 '19 23:09 doxylabs