In this post you will learn how to install Pritunl VPN Server on Debian / Ubuntu
Pritunl is an open source enterprise OpenVPN, IPSec, WineGuard VPN Server. It provides a reliable interconnection between multiple VPC (Virtual Private Cloud) networks like AWS, ORACLE, GCP. It is one of the most reliable VPN Servers in the world and also offers multiple layers of protection. Including 2FA, Mobile Authentication, User PIN etc. It has a simple web interface which allows creating complex gateways, site-to-site links etc. To install the Printunl server follow the tutorial below. It also receives daily updates as well.
Requirements:
- 512MB or more RAM (Depending upon the usage and purpose as well)
- VPS server with Root Acces
Step 1 : Updating your VPS
The first step is to update your server for any new packages, security packages or releases. Run the following command to update your server
apt-get update -y
apt-get upgrade -y
Step 2 : Installing Pritunl VPN Server
Before getting on to install the VPN Server, Install these packages as they may be needed in another step or in the process of installation
apt install wget unzip curl gnupg2
Pritunl VPN Server Packages is not available in Ubuntu or Debian by default, Here we will need to add some repository keys before we can install the server itself
— Run this command for Ubuntu Servers & Debian Servers
apt-key adv –keyserver hkp://keyserver.ubuntu.com –recv E162F504A20CDF15827F718D4B7C549A058F8B6B
apt-key adv –keyserver hkp://keyserver.ubuntu.com –recv 7568D9BB55FF9E5287D586017AE645C0CF8E292A
Run the following command to add the repository file
echo “deb http://repo.pritunl.com/stable/apt focal main” | sudo tee /etc/apt/sources.list.d/pritunl.list
Run the command to install the VPN Server
apt-get update
apt-get install pritunl
You will see a prompt like this press “Y“
You have now completely installed the Pritunl VPN Server,
Enable the VPN server on boot and start it
systemctl enable pritunl
systemctl start pritunl
— Check whether the server is running or not
systemctl status pritunl
You will see a prompt like this :
Step 3 : Installing MongoDB
Pritunl server uses MongoDB server, The MongoDB server is not available by default in Ubuntu or Debian Packages, So we will need to add its repository file so we can continue installing it: Run the following command to install MongoDB Server
curl -fsSL https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add –
Add it’s repository file
echo “deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse” | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
apt-get update
apt-get install mongodb-server
Step 4 : Configuring Pritunl through WebGUI
Access your WebGUI at http://localhost or https://localhost:443, By default it will work on a non-HTTPS port.
You will see a prompt like this
To get the setup key run the following command
pritunl setup-key
You will get prompt like this:
Then you will see a screen like this:
Then, You will be redirected to the login screen where you will see a screen like this
Run the following command to get your default administration password
pritunl default-password
After logging in you will see a screen like this, Configure it according to your needs
Conclusion:
You have successfully installed Pritunl VPN server on your VPS, This tutorial was tested successfully on Ubuntu 20.04, This tutorial assumes that you are root!