TODO: project links

See also | :sshuttle


Connect to an existing OpenVPN network



  1. Install OpenVPN packages in Ubuntu

sudo apt install openvpn openvpn-blacklist network-manager-openvpn

  1. Add a VPN Network Connection of the "OpenVPN" type

  1. Under "VPN" tab:
    • Set the gateway to the value provided by your sysadmin
    • Select "Certificates" as the authentiction type. Add certificates and key files to respective fields.

  1. Under the "VPN" tab, click "Advanced..."
    • Tick any options provided by your sysadmin (for example, LZO, TCP and TAP)

  1. Under "IPv4 Settings" tab:
    • For Method select "Automatic (VPN) addresses only" (not "Automatic (VPN)")
    • Click "Routes" button, tick "Use this connection only for resources on its network"
    • You may have to do something similar for IPv6

  1. Save

  1. Select the VPN from the Network Manager | VPN menu.

Debug a connection stored with Network Manager

If you have followed the procedure above and the VPN connection is failing, you will have to attempt the connection from the command line to see what the error message is:

  1. First identify the file containing the VPN connection.

ls /etc/NetworkManager/system-connections
# file is usually named <CONNECTION-NAME>-<UUID>

  1. Confirm the file is the correct one

sudo cat /etc/NetworkManager/system-connections/<FILENAME>
# should contain the settings from instructions above

  1. Attempt the VPN connection from the command line:

sudo openvpn --config /etc/NetworkManager/system-connections/<FILENAME>

  1. Report the error to your sysadmin.


Backlinks: sshuttle

CC0 / Public domain dedication To the extent possible under law, d3vid seaward has waived all copyright and related or neighboring rights to "OpenVPN in Grasmere notebook, including code snippets" (why? how?)