If I understand your question correctly, I have the same goal : split tunnelling for my Ubuntu openvpn client.
From what I read so far, the network-manager (GUI) within Ubuntu-Gnome does not support such routing settings. It will route everything on the created network interface (tun0). This is a limitation from that software.
I did succeed doing that ...
Ok, so in the end I was able to solve this problem thanks to a piece of advice from someone I'm working with. Apparently I just needed to change the line:
in my ovpn file to:
And that solved the problem! This solution did not come up anywhere I searched online so I wanted to be sure to share it here in case it would be useful for ...
Probably, these settings are cleared when you force a network-manager restart. Try
sudo service network-manager restart
Still a rather brute solution but one level better than pc restart. If it works, it can be automated by putting a script in /etc/NetworkManager/dispatcher.d with contents:
if [[ "$2"="vpn-down" ]]; then
It is not possible to add a .desktop launcher to all desktops of different users at once. You need to place a file in the "Desktop" folder of each users. That can be scripted, though, to automate the process.
A better way, both from a sysadmin and user point of view, would be to put the launcher in /usr/share/...
You should be able to see what goes where using the route command. It will tell you what IP addresses get routed where. Here is a common example:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default _gateway 0.0.0.0 UG 100 0 0 enp0s31f6
Use sudo systemd-resolve --revert --interface vpn0 to reset resolv.conf after getting off the VPN.
If that works, you can run it automatically when disconnecting from the VPN by creating /etc/network/if-post-down.d/vpn0 with the following contents:
if [ "$IFACE" = "vpn0" ]; then
systemd-resolve --revert --interface vpn0
First of all you would need to install the OpenVPN client. After that,
If you got an *.ovpn file from your vendor, then you can refer to this thread to get a quick start:
How to setup OpenVPN Client
Otherwise, you would need to refer to "Step 8 — Creating the Client Configuration Infrastructure" as documented in this link:
How To Set Up an OpenVPN ...