OpenVPN NetworkManager setup guide
However, Network Manager occasionally kills the OpenVPN process after network interruptions. High network loading seems to increase the risk. And when connectivity returns, Network Manager doesn't restart OpenVPN.
Therefore, to ensure that you have no leaks when using OpenVPN with Network Manager, it's crucial to have firewall (iptables) rules that restrict traffic to the VPN tunnel, and that allow direct connections only to the VPN server. It's also prudent to block all IPv6 traffic.
-
Install OpenVPN and the OpenVPN plugin for the Network Manager. Depending on your distro you may also require the
network-manager-openvpn-gnome
package.sudo apt-get install openvpn network-manager-openvpn
-
Download the latest config files and extract contents to a temporary directory.
-
Click on the Network Manager icon (normally top right menubar) and select
Edit connections..
>"+"
>Import a saved VPN configuration..
>Create
. -
Select one of the .ovpn files you extracted from step 2 representing the server you would like to configure and click
Open
to import. -
The VPN configuration window will open on the
VPN
tab. Under theAuthentication
heading update theType
toPassword
. -
Enter your account ID that begins with letters ‘ivpnXXXXXXXX’ or ‘i-XXXX-XXXX-XXXX’ and any password.
Only your account ID is used for authentication and is case-sensitive. The password field can be left empty or set to anything if your client software requires a non-blank password. -
Click on the Network Manager icon in the toolbar and select the newly configured server under
VPN Connections
. -
Once connected you should see a a small lock next to the Network Manager icon. You can confirm that you are connected by checking your external IP in the terminal.
curl ifconfig.co
Troubleshooting
Most issues can be easily resolved by reviewing the OpenVPN logs. Network Manager normally writes to the syslog e.g. /var/log/syslog
or /var/log/messages
. You can filter the relevant logs by using grep e.g.
sudo grep VPN /var/log/syslog
Suggest an edit on GitHub.