How VPS - How to use/setup VPS
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System CentOS

Installing Pritunl on CentOS 7

How VPS by How VPS
October 1, 2019
in CentOS
0
10 Lesser Known Commands for Linux – Part 3
0
SHARES
21
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Prerequisites
  2. Installation
    1. Installing dependencies
    2. Installing Pritunl
  3. Configuration
  4. Adding Users
  5. Creating the VPN server
  6. Connecting to your VPN server
  7. Enhancing Security
  8. Conclusion
  9. Want to contribute?


Pritunl is an open source management interface for OpenVPN. It allows for private networks, has native IPv6 support, and is relatively simple to use.

That said, it also receives regular updates, and allows for full customization. In addition to the features above, custom routes are supported, and key size can be selected for increased performance.

Prerequisites

In order to install Pritunl, you’ll need:

  • A CentOS 7 system (both 32 and 64 bit systems are supported).
  • Root access (determine whether you are root by executing the following command: whoami).
  • A minimum of 512 MB of RAM, or the lowest plan.
  • MongoDB.
  • Either nano or vim (text editor).
  • SELinux disabled.

Installation

Installing dependencies

In order to install Pritunl, we’ll need to add the necessary repositories to yum. Yum is essentially the package manager for CentOS and RHEL systems. It is similar to apt-get, so don’t worry if this is your first time.

We’ll be using nano for this tutorial, but you may use vim, if you prefer.

The first thing we’ll be doing is adding the MongoDB repository:

nano /etc/yum.repos.d/mongodb-org-3.4.repo

Once you’ve entered the file, it should be blank. Paste the following in:

[mongodb-org-3.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc

Exit and save by pressing CTRL and O simultaneously. Once you do, simply press the “enter” key.

Now that we’ve added the repository for MongoDB (database software for Pritunl), we need to add the Pritunl repository.

nano /etc/yum.repos.d/pritunl.repo

When the file loads in your text editor, paste the following:

[pritunl]
name=Pritunl Repository
baseurl=https://repo.pritunl.com/stable/yum/centos/7/
gpgcheck=1
enabled=1

Exit and save.

Continuing on, we need to install epel-release:

yum -y install epel-release

We now have all of the dependencies required. We’ll need to disable SELinux before continuing:

nano /etc/selinux/config

It should say the following once opened:

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=enforcing . 
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected, 
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

Change the SELINUX=enforcing line to SELINUX=disabled.

Reboot your server, and log back in.

Installing Pritunl

We’ve added all of the necessary packages and changed the necessary settings to install Pritunl.

Before we install, we need to add some keys (necessary for the repositories to function):

gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 7568D9BB55FF9E5287D586017AE645C0CF8E292A
gpg --armor --export 7568D9BB55FF9E5287D586017AE645C0CF8E292A > temp.tmp; sudo rpm --import temp.tmp

We can now delete the temporary key:

rm -f temp.tmp

Now, we’ll run yum to install Pritunl:

yum -y install pritunl mongodb-org

Once yum finishes, we’ll make it so Pritunl and MongoDB run on startup:

systemctl start mongod pritunl
systemctl enable mongod pritunl

Pritunl is now installed.

Configuration

After installing Pritunl, run the following:

pritunl setup-key

Make note of the key that comes from running the command above.

Now, visit your server:

https://YOUR_IP_ADDRESS

You should see the following:

Installing Pritunl on CentOS 7

Paste the key that you were given from pritunl setup-key.

Once you hit the “Save” button, you will be prompted to set credentials. You will then be redirected to the login page:

Installing Pritunl on CentOS 7

Sign in with your credentials. Proceed to the next section on adding users, and creating your first VPN server.

Adding Users

If you wish to allow other users (whether it be a friend, or colleague), click the “Users” link on the navigation bar:

Installing Pritunl on CentOS 7

You should have created an organization already, and creating a user is simple. Click “Add User”, and you will be prompted with the following:

Installing Pritunl on CentOS 7

Creating the VPN server

As mentioned previously, Pritunl simply manages OpenVPN.

Head to the “Servers” tab in the navigation bar and click “Add Server.” You will be prompted with the following:

Installing Pritunl on CentOS 7

Fill in the fields with the appropriate information. You may choose the protocol (UDP is better for speed, and shorter distances), local IP range, and other options available through the “Advanced” tab.

Once you hit “Add,” the dialog will close. After it does, click “Attach Organization”.

Select the organization we created in the previous section, and the VPN server created in this section.

Hit “Attach.”

Connecting to your VPN server

As Pritunl uses OpenVPN, connecting should be a breeze. You can choose to install the Pritunl client, or the standalone OpenVPN client.

Note: Installing a client is necessary in order to connect.

Before installing the client, proceed back to the “Users” tab in the management interface. You should see icons next to the user you created:

Installing Pritunl on CentOS 7

A tar.gz file will begin to download. Upon extraction, you’ll receive the profile required to connect. Save the file in a safe place.

You can download the Pritunl client from the official site. The client supports all OpenVPN servers.

Enhancing Security

For enhanced security, enable two-factor authentication with Pritunl! Two factor authentication is available with Pritunl. It adds the functionality to OpenVPN. You can use Authy, or any supported app to generate the code that you can use to connect.

Conclusion

Congratulations! You’ve installed and configured your own VPN server.

If you need to uninstall, the process is simple. Run: yum remove -y pritunl mongodb-org

Enjoy!

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
How VPS

How VPS

Related Posts

Failed to download metadata for repo 'appstream' on Centos 8
CentOS

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Install BoltWire CMS on CentOS 7
CentOS

How to Install BoltWire CMS on CentOS 7

February 14, 2020
Showterm.io – A Terminal/Shell Recording, Upload and Share Tool for Linux
CentOS

Setup HTTP Authentication With Nginx on CentOS 7

February 14, 2020
Next Post

How To Install Counter-Strike: Global Offensive on CentOS 7

How to Install MODX CMS and Nginx on CentOS 7

Two Docker Graphical Managing Tools: DockerUI and Shipyard

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Follow Us

  • 121 Followers
  • 87.2k Followers

Recommended

How to Fix “passwd: Authentication token manipulation error” in Linux

4 years ago

How to Install Proxmox on Debian Jessie

3 years ago

Setup Firefox Sync Server on Debian 9 or Ubuntu 16.04

3 years ago

Install the Cloud9 IDE on Debian Wheezy

3 years ago

Instagram

    Please install/update and activate JNews Instagram plugin.

Categories

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel

Topics

Apache Web Server Bluehost Review 2019 Bluehost Review 2020 Bluehost Review 2021 Centmin Mod CentminMod centos install htop fsck htop install HTTP DoS attack Install Snort on an Ubuntu install Zabbix on CentOS install Zabbix on CentOS 7 Linux Commands linux guide linux install htop linux vps setup guide MariaDB MariaDB Error Mysql mysqld error optimize MariaDB optimize Mysql snort Ubuntu
No Result
View All Result

Highlights

Top Free Web Hosting Control Panels To Manage VPS/Dedicated Servers

Webmin Reviews

Virtualmin Reviews

CentOS Web Panel Reviews

Ajenti Reviews

ISPConfig Reviews

Trending

Failed to download metadata for repo 'appstream' on Centos 8
CentOS

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

by How VPS
February 25, 2022
0

I tried to update some extensions by use yum on centOs which I specified in Dockerfile. After...

How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020
Top Free Web Hosting Control Panels To Manage VPS/Dedicated Servers

Top Free Web Hosting Control Panels To Manage VPS/Dedicated Servers

February 17, 2020
Webmin Reviews

Webmin Reviews

February 17, 2020
How VPS – How to use/setup VPS

We bring you the best Premium WordPress Themes that perfect for news, magazine, personal blog, etc. Visit our landing page to see all features & demos.
LEARN MORE »

Recent News

  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8 February 25, 2022
  • How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”? November 17, 2020
  • How to optimize Mysql or MariaDB November 3, 2020

Categories

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel

[mc4wp_form]

© 2018 JNews - City News Magazine WordPress theme. All rights belong to their respective owners.
JNews is a top selling 2018 WordPress News, Blog, Newspaper & Magazine Theme.

No Result
View All Result
  • Home

© 2023 JNews - Premium WordPress news & magazine theme by Jegtheme.