To install OpenVPN, go to
https://openvpn.net/index.php/access-server/download-openvpn-as-sw.html
Download software for your OS.
For Ubuntu download and install it with
wget http://swupdate.openvpn.org/as/openvpn-as-2.1.4b-Ubuntu16.amd_64.deb dpkg -i openvpn-as-2.1.4b-Ubuntu16.amd_64.deb
You will see
root@backup:~# dpkg -i openvpn-as-2.1.4b-Ubuntu16.amd_64.deb Selecting previously unselected package openvpn-as. (Reading database ... 91797 files and directories currently installed.) Preparing to unpack openvpn-as-2.1.4b-Ubuntu16.amd_64.deb ... Unpacking openvpn-as (2.1.4b-Ubuntu16) ... Setting up openvpn-as (2.1.4b-Ubuntu16) ... The Access Server has been successfully installed in /usr/local/openvpn_as Configuration log file has been written to /usr/local/openvpn_as/init.log Please enter "passwd openvpn" to set the initial administrative password, then login as "openvpn" to continue configuration here: https://198.50.234.186:943/admin To reconfigure manually, use the /usr/local/openvpn_as/bin/ovpn-init tool. Access Server web UIs are available here: Admin UI: https://198.50.234.186:943/admin Client UI: https://198.50.234.186:943/ root@backup:~#
Before you can access Admin UI, you need to set password for user “openvpn”.
To change password, run
passwd openvpn
Example
root@backup:~# passwd openvpn Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully root@backup:~#
Now you can access OpenVPN Admin area at
https://YOUR-SERVER-IP:943/admin User = openvpn Pass = the one you set in above step.
You can login to client area and download cliient.ovpn from
https://YOUR-SERVER-IP:943/
Once logged in to OpenVPN client area, you will see
Click on “user-locked profile” link to download your OpenVPN configuration file – client.ovpn
On Ubuntu Desktop, you need to install OpenVPN with command
apt install openvpn
Now to connect, run
openvpn --config /path/to/client.ovpn
To disconnect from OpenVPN, type CTRL+C or just close the terminal that is running openvpn.
To configure OpenVPN through NetworkManager, you need to install
sudo apt-get install network-manager-openvpn-gnome
Stop/Start OpenVPN
OpenVPN systemd service file located in /etc/systemd/system/openvpnas.service
To start OpenVPN, run
systemctl start openvpnas
To stop, run
systemctl stop openvpnas