I have found a work-around for 14.04 LTS. It's not the prettiest one but it works. When I started a vpn connection and then ran
ps -efwww | grep vpn
I could see that the openvpn is already called with flags "--script-security 2 --up /usr/lib/NetworkManager/nm-openvpn-service-openvpn-helper". So the following can be performed.
sudo nano /usr/lib/NetworkManager/nm-openvpn-service-openvpn-helper
--- Add the following 3 lines to the file. ---
#!/bin/bash
/etc/openvpn/update-resolv-conf $@
/usr/lib/NetworkManager/nm-openvpn-service-openvpn-helper.orig $@
--- End---
Now here is the really ugly part. Since openvpn was not called with the --down flag, you should run the following command every single time the vpn connection is closed.
Change the device name according to your connection settings.
I have found a work-around for 14.04 LTS. It's not the prettiest one but it works. When I started a vpn connection and then ran NetworkManager/ nm-openvpn- service- openvpn- helper" . So the following can be performed.
ps -efwww | grep vpn
I could see that the openvpn is already called with flags "--script-security 2 --up /usr/lib/
sudo cp /usr/lib/ NetworkManager/ nm-openvpn- service- openvpn- helper /usr/lib/ NetworkManager/ nm-openvpn- service- openvpn- helper. orig
sudo nano /usr/lib/ NetworkManager/ nm-openvpn- service- openvpn- helper update- resolv- conf $@ NetworkManager/ nm-openvpn- service- openvpn- helper. orig $@
--- Add the following 3 lines to the file. ---
#!/bin/bash
/etc/openvpn/
/usr/lib/
--- End---
sudo chmod +x /usr/lib/ NetworkManager/ nm-openvpn- service- openvpn- helper
Now here is the really ugly part. Since openvpn was not called with the --down flag, you should run the following command every single time the vpn connection is closed.
Change the device name according to your connection settings.
sudo script_type=down dev=tun0 /etc/openvpn/ update- resolv- conf