{"id":8207,"date":"2021-03-16T00:00:36","date_gmt":"2021-03-15T21:00:36","guid":{"rendered":"https:\/\/kifarunix.com\/?p=8207"},"modified":"2024-03-19T19:18:35","modified_gmt":"2024-03-19T16:18:35","slug":"install-and-setup-pritunl-vpn-server-on-debian","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-and-setup-pritunl-vpn-server-on-debian\/","title":{"rendered":"Install and Setup Pritunl VPN Server on Debian"},"content":{"rendered":"\n
In this tutorial, you will learn how to install and setup Pritunl VPN server on Debian 10. Pritunl<\/a> is an open source enterprise distributed OpenVPN, IPsec and WireGuard Server<\/em>. It can provide a reliable interconnection between various virtual private cloud (VPC) networks such as AWS, GCP, Oracle Cloud. It is one of the most secure VPN server available and the only VPN server to offer up to five layers of authentication. Including a user certificate, six digit user pin, two-factor authenticator, single sign-on and mobile push authentication<\/em>.<\/p>\n\n\n\n In this tutorial, we will be installing Pritunl on Debian 10 system.<\/p>\n\n\n\n Pritunl is not available on the default Debian repositories;<\/p>\n\n\n\n Therefore, in order to install and setup Pritunl VPN server, you need to install the Debian repositories by running the command below;<\/p>\n\n\n\n Run the command below to install the Pritunl repository key.<\/p>\n\n\n\n Update system package cache;<\/p>\n\n\n\n Now that the Pritunl repositories are installed, the Pritunl package should now be available for installation;<\/p>\n\n\n\n So you can simply install Pritunl VPN server on Debian 10 by running the command below;<\/p>\n\n\n\n Once the installation is done, you can start and enable Pritunl to run on system boot by executing the command below;<\/p>\n\n\n\n To check the status;<\/p>\n\n\n\n Pritunl uses MongoDB as the database backend. Thus you need to install it.<\/p>\n\n\n\n Follow the link below to install MongoDB on Debian 10;<\/p>\n\n\n\n Install MongoDB on Debian 10<\/a><\/p>\n\n\n\n You can now access Pritunl server from your preferred web browser and finalize on the setup. Use the URL When you access the URL, you will be prompted to enter the setup key and MongoDB URL.<\/p>\n\n\n\n For the setup key, you can obtain it by running the command below;<\/p>\n\n\n\n For the MongoDB URL, we will it with the default. Be sure to update the URL accordingly.<\/p>\n\n\n\n Click Save<\/strong> to proceed.<\/p>\n\n\n\n When you click Save button above, you are redirected to Pritunl login in page;<\/p>\n\n\n\n You can obtain the default login credentials running the command below;<\/p>\n\n\n\n Enter the credentials and sign in.<\/p>\n\n\n\n Once you sign in, you are welcomed by initial setup screen. The only things we are going to change here, in this setup, is the username<\/strong> and the password<\/strong> and the VPN server IP<\/strong>. Click Save if you made the changes or simply choose to setup later;<\/p>\n\n\n\n You need an organization, a user and server added to Pritunl in order for VPN connections to work.<\/p>\n\n\n\n Click on Users<\/strong> > Add Organization<\/strong> to create an organization.<\/p>\n\n\n\n Similarly, click Add User <\/strong>to add a user.<\/p>\n\n\n\n Next, create Pritunl VPN server by clicking on the Servers<\/strong> tab > Add Server<\/strong>. Set your Server name, Port, DNS Server IP, Virtual networks. Click Advanced<\/strong> for advanced VPN settings.<\/p>\n\n\n\n If you have other networks, you can add other routes.<\/p>\n\n\n\n Next, attach VPN Server to an Organization created above.<\/p>\n\n\n\n Once that is done, this is how the servers page should now look like;<\/p>\n\n\n\n You can now run Pritunl VPN server by clicking Start<\/strong>.<\/p>\n\n\n\n The VPN server is now running.<\/p>\n\n\n\n That marks the end of our tutorial on setting Pritunl VPN server. Follow the link below to learn how to connect to configure Pritunl VPN client system to connect to Pritunl VPN server.<\/p>\n\n\n\n Install Pritunl VPN client on Debian\/Ubuntu<\/a><\/p>\n\n\n\n Installing Pritunl VPN Server<\/a><\/p>\n\n\n\n Setup IPSec VPN Server with Libreswan on CentOS 8<\/a><\/p>\n\n\n\n Connect to Cisco VPN Using PCF file on Ubuntu<\/a><\/p>\n\n\n\nInstalling Pritunl VPN Server on Debian<\/h2>\n\n\n\n
Install Pritunl Repositories on Debian 10<\/h3>\n\n\n\n
apt show pritunl<\/code><\/pre>\n\n\n\n
N: Unable to locate package pritunl\nN: Unable to locate package pritunl\nE: No packages found<\/code><\/pre>\n\n\n\n
sudo tee \/etc\/apt\/sources.list.d\/pritunl.list << EOF\ndeb https:\/\/repo.pritunl.com\/stable\/apt buster main\nEOF<\/code><\/pre>\n\n\n\n
Install Pritunl repository signing key<\/h3>\n\n\n\n
sudo apt-key adv --keyserver hkp:\/\/keyserver.ubuntu.com --recv 7568D9BB55FF9E5287D586017AE645C0CF8E292A<\/code><\/pre>\n\n\n\n
Run System Update<\/h3>\n\n\n\n
apt update<\/code><\/pre>\n\n\n\n
Install Setup Pritunl VPN Server on Debian 10<\/h3>\n\n\n\n
apt-cache policy pritunl<\/code><\/pre>\n\n\n\n
pritunl:\n Installed: (none)\n Candidate: 1.29.2664.67-0debian1~buster\n Version table:\n 1.29.2664.67-0debian1~buster 500\n 500 https:\/\/repo.pritunl.com\/stable\/apt buster\/main amd64 Packages<\/code><\/pre>\n\n\n\n
apt install pritunl<\/code><\/pre>\n\n\n\n
Running Pritunl Service on Debian<\/h3>\n\n\n\n
systemctl enable --now pritunl<\/code><\/pre>\n\n\n\n
systemctl status pritunl<\/code><\/pre>\n\n\n\n
\u25cf pritunl.service - Pritunl Daemon\n Loaded: loaded (\/etc\/systemd\/system\/pritunl.service; enabled; vendor preset: enabled)\n Active: active (running) since Mon 2021-03-15 15:44:50 EDT; 55s ago\n Main PID: 4660 (pritunl)\n Tasks: 20 (limit: 2359)\n Memory: 107.9M\n CGroup: \/system.slice\/pritunl.service\n \u251c\u25004660 \/usr\/lib\/pritunl\/bin\/python \/usr\/lib\/pritunl\/bin\/pritunl start\n \u2514\u25004680 pritunl-web\n\nMar 15 15:44:50 debian systemd[1]: Started Pritunl Daemon.\nMar 15 15:44:50 debian pritunl[4660]: \/usr\/lib\/pritunl\/local\/lib\/python2.7\/site-packages\/OpenSSL\/crypto.py:12: CryptographyDeprecationWarning: Python 2 is no longer support\nMar 15 15:44:50 debian pritunl[4660]: from cryptography import x509<\/code><\/pre>\n\n\n\n
Install MongoDB on Debian 10<\/h3>\n\n\n\n
Setup Pritunl VPN Server on Debian 10<\/h3>\n\n\n\n
https:\/\/server-IP-or-resolvable-hostname<\/strong><\/code>.<\/p>\n\n\n\n
Setup Pritunl Setup Key and Database URL<\/h4>\n\n\n\n
<\/figure>\n\n\n\n
pritunl setup-key<\/code><\/pre>\n\n\n\n
netstat -altnp | grep 27017<\/code><\/pre>\n\n\n\n
tcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTEN 4158\/mongod<\/code><\/pre>\n\n\n\n
Login to Pritunl Web Interface<\/h4>\n\n\n\n
<\/figure>\n\n\n\n
pritunl default-password<\/code><\/pre>\n\n\n\n
...\n[undefined][2021-03-15 16:03:12,676][INFO] Getting default administrator password\nAdministrator default password:\n username: \"pritunl\"\n password: \"9stjtiF3PUsy\"<\/code><\/pre>\n\n\n\n
Pritunl Initial Setup<\/h4>\n\n\n\n
<\/figure>\n\n\n\n
Pritunl Dashboard<\/h4>\n\n\n\n
<\/figure>\n\n\n\n
Users and Organizations<\/a><\/h4>\n\n\n\n
Add Pritunl Organization and Users<\/h5>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
Create Pritunl VPN Server<\/h4>\n\n\n\n
Add Server<\/h5>\n\n\n\n
<\/figure>\n\n\n\n
Add Routes<\/h5>\n\n\n\n
Attach VPN Server to an Organization<\/h5>\n\n\n\n
<\/figure>\n\n\n\n
Running Pritunl VPN Server<\/h3>\n\n\n\n
<\/figure>\n\n\n\n
Reference<\/h3>\n\n\n\n
Other Tutorials<\/h3>\n\n\n\n