Installing OpenVPN on a Debian VPS
Introducing the OpenVPN protocol
OpenVPN is an open source software application that implements virtual private network (VPN) techniques for creating secure point-to-point or site-to-site connections. It uses SSL/TLS for key exchange.
This tutorial explains how to setup your own VPN server in no more than ten minutes, even if you have never used OpenVPN.
OpenVPN Access Server (OpenVPN-AS)
OpenVPN Access Server is a set of installation and configuration tools that simplify the rapid deployment of a VPN remote access solution.
We are going to use OpenVPN-AS to generate SSL certificates and authenticate users in a user-friendly manner.
Accessing VPS as root
Use the following command to manage your VPS as root. You can find the root password on your Vultr account panel.
ssh root@12.34.56.78
Change 12.34.56.78 to the IP address of your VPS. You will be asked for the fingerprint of the server. Accept it, then enter the password for the root user. It is highly recommended to set a new password for the root user. This operation is made easy with the following command:
passwd
You will be asked twice for the new password. Remember to use this password if you need to access the server in future.
Updating your system
Update your system libraries and applications by executing these commands. The first one updates the list of repositories, and the second performs the actual component update.
apt-get update
apt-get upgrade
Installing OpenVPN-AS
If you are running a 64-bit server, use these commands:
wget http://swupdate.openvpn.org/as/openvpn-as-2.0.10-Debian7.amd_64.deb
dpkg -i openvpn-as-2.0.10-Debian7.amd_64.deb
If you are running a 32-bit server, use the following commands instead:
wget http://swupdate.openvpn.org/as/openvpn-as-2.0.10-Debian7.i386.deb
dpkg -i openvpn-as-2.0.10-Debian7.i386.deb
OpenVPN-AS is now installed. Next, we need to set a password for the openvpn
user. Run the following:
passwd openvpn
Configuration and administration over the web
The point of OpenVPN is that you can configure it without system administration experience. The administrator user interface will be located at the following URL.
https://12.34.56.78:943/admin
Once again, remember to substitute your IP address.
Creating new users
By default, OpenVPN-AS will authenticate each Linux user on your system. If you would like to add another user, use the command below.
adduser myusername
Running adduser
will prompt for a password. The same password is used to access the OpenVPN client installer, which can be obtained at the following URL:
https://12.34.56.78:943
Remember to change the IP address. When visiting this URL, enter the new user details. Next, install the software on your client computer and you can begin using OpenVPN!