Pritunl VPN is an open source VPN server and management panel. Has a graphical interface (GUI) that provides a friendly interaction to the user. It is the best alternative for open source and commercial VPN products such pulse secure. Pritunl has a capability of creating wide cloud VPN networks which can support over a thousands of users.

In this tutorial, I am going to guide you on how to install and configure Pritunl VPN on CentOS 8 | Oracle Linux 8. hope you will enjoy.

Step 1: Add Required Repositories

As initial step, we are going to add necessary repositories to yum. In this tutorial, am using vim as my editor. Pritunl VPN requires MongoDB for database management and we are going to add MongoDB repository as below:

sudo tee /etc/yum.repos.d/mongodb-org-4.2.repo<<EOF
[mongodb-org-4.2]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/8/mongodb-org/4.2/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.2.asc
EOF

Next, add Pritunl repository as shown below:

CentOS 8:

sudo tee /etc/yum.repos.d/pritunl.repo << EOF
[pritunl]
name=Pritunl Repository
baseurl=https://repo.pritunl.com/stable/yum/centos/8/
gpgcheck=1
enabled=1
EOF

Oracle Linux 8:

sudo tee /etc/yum.repos.d/pritunl.repo<<EOF
[pritunl]
name=Pritunl Repository
baseurl=https://repo.pritunl.com/stable/yum/oraclelinux/8/
gpgcheck=1
enabled=1
EOF

Once the repositories have been added proceed to step 2.

Step 2: Install Epel Repository

We will need to install EPEL repository which is very important in this process. EPEL Repository is an additional repository that provides easy access to install packages for commonly used software. Provides an interface for easy access to softwares on Enterprise Linux compatible distribution.

sudo dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

Step 3: Install Pritunl and MongoDB on Oracle Linux 8

Importantly, we will need to add keys first before we proceed to installation. Enter the following command in your terminal.

$ sudo gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 7568D9BB55FF9E5287D586017AE645C0CF8E292A

gpg: directory '/root/.gnupg' created
gpg: keybox '/root/.gnupg/pubring.kbx' created
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key 7AE645C0CF8E292A: public key "Pritunl <[email protected]>" imported
gpg: Total number processed: 1
gpg:               imported: 1

Export the key as below:

gpg --armor --export 7568D9BB55FF9E5287D586017AE645C0CF8E292A > key.tmp; sudo rpm --import key.tmp; rm -f key.tmp

NOTE: Don’t clear terminal and lose this key. You will need at during your first time login to pritunl vpn.

Lets now install pritunl and mongoDB by entering the following command your terminal.

sudo dnf -y install pritunl mongodb-org

Start and enable both Pritunl and MongoDB as below:

sudo systemctl start mongod pritunl
sudo systemctl enable mongod pritunl

Step 4: Configuring VPN using Pritunl

Run the following command to generate a setup-key that you will use to login before creating one of your choice.

sudo pritunl setup-key

Take note of the command output as it is required in the next step.

It is time configure our vpn from the bowser. Visit your server by typing your http://<ip address>. You should get a page as below:

Copy and paste the key that was generated with pritunl setup-key command. When you click “save”, a new window will open requesting you to set your login credentials.

Once you set your credentials you will be redirected to login page as below:

Enter your credentials to login. You will be directed to the page below after clicking “sign in” where you can add organization, users and servers.

Use links in the navigation bar to add users and servers.

Adding Users on Pritunl VPN

Click on the “Users” link in the nav bar to add new user.

Add User” link will only be enabled if you have already created an organization. Else, create add an organization first before adding a user.

Enter the name then press “add” to create. Let’s now proceed to add user:

Creating the VPN server

Click on the “Servers” link in the nav bar to add a server.

Configure Server Routes

Routes control the traffic passing through the VPN. By default, the VPN server allows 0.0.0.0/0 which routes all internet traffic through the VPN. In order to allow specific traffic, remove 0.0.0.0/0 route lick Add Route to add your local network route.

Downloading User Profile

Once Pritunl VPN has been successfully created, user profiles can then be downloaded on the Users page. Click on the download button or profile links button on the right side of a user.

This was a simple procedure on how to install Pritunl VPN on Oracle Linux 8.0. You can perform unistallation process by running the following command in terminal.

sudo dnf remove -y pritunl mongodb-org

Step 5: Install Pritunl VPN Client On CentOS 8 | Oracle Linux 8

To install Pritunl VPN client on CentOS 8 | Oracle Linux 8, add pritunl repository as below:

CentOS 8:

sudo tee /etc/yum.repos.d/pritunl.repo << EOF
[pritunl]
name=Pritunl Repository
baseurl=https://repo.pritunl.com/stable/yum/centos/8/
gpgcheck=1
enabled=1
EOF

Oracle Linux 8:

sudo tee /etc/yum.repos.d/pritunl.repo << EOF
[pritunl]
name=Pritunl Stable Repository
baseurl=https://repo.pritunl.com/stable/yum/oraclelinux/8/
gpgcheck=1
enabled=1
EOF

Add key:

gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 7568D9BB55FF9E5287D586017AE645C0CF8E292A

Import key as below:

gpg --armor --export 7568D9BB55FF9E5287D586017AE645C0CF8E292A > key.tmp; sudo rpm --import key.tmp; rm -f key.tmp

Install Pritunl VPN client

sudo dnf install pritunl-client-electron

Once installed, you should be able to see the application which appears as below:

Import your downloaded profile and you should be able to connect to the Pritunl VPN server. Enjoy!

Check more interesting guides below:

LEAVE A REPLY

Please enter your comment!
Please enter your name here

1 × 3 =