Introduction

Following shows the easy installation of the openvpn client with a auto-login certificate.

Prerequisites

You require a client.ovpn file which should be given to you before hand by the OpenVPN Administrator.

Install and Setup

  1. Install the openvpn client

    sudo apt-get install openvpn


  2. Copy the client.ovpn to /etc/openvpn and rename if to client.conf

  3. Enable the auto start of the service within systemd


    user@user-desktop:~$ sudo systemctl enable openvpn@client.service
    Created symlink from /etc/systemd/system/multi-user.target.wants/openvpn@client.service to /lib/systemd/system/openvpn@.service.


  4. You can now start the client

    user@user-desktop:~$ sudo service openvpn@client start






Verify Connection

Disable Autostart

Sometimes you want to disable autostart, because VPN will be switched on through an action.

Edit the openvpn default config file.


user@ubuntu:~$ sudo gedit /etc/default/openvpn


And uncomment the line:

#AUTOSTART="none"