This tutorial intends to teach you to Install and Configure Pritunl VPN Server and Client on Debian 11.
Pritunl is an open-source platform capable of realizing distributed VPN networks. By leveraging the OpenVPN protocol it allows -according to the chosen licensing model- to set up virtual network architectures.
Steps To Install Pritunl VPN Server and Client on Debian 11
To complete this guide, you must log in to your server as a non-root user with sudo privileges. To do this, you can follow our guide on Initial Server Setup with Debian 11.
Required Packages for Pritunl VPN
First, you need to update and upgrade your local package index with the command below:
sudo apt update && sudo apt upgrade -y
Then, use the following command to install the required packages:
sudo apt install gpg curl gnupg2 software-properties-common apt-transport-https lsb-release ca-certificates -y
At this point, you need to add the MongoDB and Pritunl VPN Server repositories on your Debian 11. To do this, follow the steps below.
Add MongoDB GPG Key and Repository on Debian 11
Import MongoDB APT repository keys to your system by using the following command:
curl -fsSL https://www.mongodb.org/static/pgp/server-5.0.asc | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/mongodb-5.gpg
Next, use the command below to add the MongoDB repository:
echo "deb http://repo.mongodb.org/apt/debian buster/mongodb-org/5.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list
Add Pritunl GPG Key and Repository on Debian 11
Now you need to use the command below to import the Pritunl GPG keys:
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv 7AE645C0CF8E292A
gpg: key 7AE645C0CF8E292A: public key "Pritunl <[email protected]>" imported
gpg: Total number processed: 1
gpg: imported: 1
Then, use the following command to add the Pritunl repository on Debian 11:
echo "deb http://repo.pritunl.com/stable/apt $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/pritunl.list
Install Pritunl and MongoDB on Debian 11
At this point, you need to run the system update and install the
# sudo apt update
# sudo apt install mongodb-org pritunl -y
Now use the commands below to start and enable the services:
# sudo systemctl start pritunl mongod
# sudo systemctl enable pritunl mongod
Configure and Access Pritunl VPN Server on Debian 11
At this point, you can access your Pritunl VPN server web interface by typing your server’s IP address in your web browser:
You should see the following screen:
You’ll need Setup Key to continue. To do this, run the command below in your terminal:
sudo pritunl setup-key
Enter your setup key and click Save. Then, you will see the Pritunl VPN Server sign-in screen on Debian 11.
At this point, you need to run the command below to get your default username and password:
sudo pritunl default-password
Administrator default password:
Enter the username and password on the login screen and click Sign in. You will see the initial setup page where you can change the admin user and password, set the domain and Let’s Encrypt SSL. When you are done click Save or you can set it up later.
At this point, you can configure the organizations, users, and servers from the Pritunl dashboard on Debian 11.
Add Organizations To Pritunl
You can click on Users and add the VPN users. Users are mapped to servers in an organization.
Add VPN Server To Pritunl
At this point, you can create a VPN server on Debian 11 by clicking on ‘servers’ and then ‘Add server’.
Finally, you need to attach the server to an organization by clicking on ‘Attach organization’ and choosing your organization.
Add Users To Pritunl
At this point, you can click on ‘Add user’ to create a user profile on your VPN server on Debian 11. Enter the information that is needed and click Add.
Note: To add many users at once, use the ‘Bulk Add user’ function on the web interface.
Install and Configure Pritunl Client
At this point, you can visit the Pritunl VPN clients page and choose one for your client machine to download and install. The installation part is described on the official page. Here we have downloaded the Windows Client.
Once the VPN client has been installed, log in to the Pritunl VPN server to download the user profile. Click on ‘Users’ select the particular user and click on the download icon to get the user profile.
Next, launch your Pritunl VPN client, then choose “Import Profile”.
That’s it, you are done.
At this point, you have learned to Install and Configure Pritunl VPN Server and Client on Debian 11.
Hope you enjoy it. You may be like these articles too: