I am new to the Ubuntu community and the intricacies of openvpn, networkmanager etc but I can confirm this bug on Ubuntu 16.04. I can also confirm the following workarond.
When I disable dnsmasq in NetworkManager, add script-security 2 and up & down stanzas for /etc/openvpn/update-resolv-conf the DNS servers are added to /etc/resolv.conf. But when I stop the foreground openvpn process with ctrl-c the previous pushed DNS servers /etc/resolv.conf are not removed.
Ideally /etc/resolv.conf would be restored to the way it was before the openvpn connection.
I would like to help out with this but I don't know which system (openvpn, resolvconf, dnsmasq, networkmanager) would or should be responsible for this.
I am new to the Ubuntu community and the intricacies of openvpn, networkmanager etc but I can confirm this bug on Ubuntu 16.04. I can also confirm the following workarond.
When I disable dnsmasq in NetworkManager, add script-security 2 and up & down stanzas for /etc/openvpn/ update- resolv- conf the DNS servers are added to /etc/resolv.conf. But when I stop the foreground openvpn process with ctrl-c the previous pushed DNS servers /etc/resolv.conf are not removed.
Ideally /etc/resolv.conf would be restored to the way it was before the openvpn connection.
I would like to help out with this but I don't know which system (openvpn, resolvconf, dnsmasq, networkmanager) would or should be responsible for this.