Setup a VPN server with Pritunl on Ubuntu

Prerequisites

  1. You must have Alibaba Cloud Elastic Compute Service (ECS) activated and verified your valid payment method. If you are a new user, you can get a free account in your Alibaba Cloud account. If you don’t know about how to set up your ECS instance, you can refer to this quick-start guide. Your ECS instance must have at least 1GB RAM and 1 Core processor.
  2. A non-root user with sudo privileges

Update the System

We recommend you to upgrade all the available packages and repository before installing any new packages. Execute the following command and it will do the job for you.

sudo apt-get update && sudo apt-get upgrade

Install Pritunl

Once the system is updated, you can proceed further to install and configure the Pritnul. Before installing Pritnul package on your server you will need to add the MongoDB apt repository. In order to do so, execute the following command using a nano text editor.

sudo nano /etc/apt/sources.list.d/mongodb-org-3.0.list
deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse
sudo nano /etc/apt/sources.list.d/pritunl.list
deb http://repo.pritunl.com/stable/apt trusty main
apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv 7F0CEB10apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv CF8E292A
sudo iptables -A INPUT -p udp -m udp --sport 443 --dport 1025:65355 -j ACCEPTsudo iptables -A INPUT -p tcp -m tcp --sport 443 --dport 1025:65355 -j ACCEPTsudo iptables -A INPUT -p `your protocol` -m `your protocol` --sport `your port` --dport 1025:65355 -j ACCEPT
sudo apt-get update
sudo apt-get install pritunl mongodb-org
sudo service pritunl start

Configuration

You have successfully installed Pritnul on your server, now you will have to configure it from the web for the usage. Open up your favorite web browser and visit http://YourServerIP:443/ Please replace YourServerIP with your actual server IP address.

Connecting to the Server

Pritnul is installed and configured on your server now you’ll need to connect it to the server. Before connecting to the server you must create an organization and a user.

Conclusion

In this guide, you have learned to install and configure Pritnul on your Ubuntu server. You also learned to create your own VPN server using pritnul. You can now easily deploy a VPN server and use it for various applications. We hope now you have enough knowledge to work with Pritnul.

Original Source

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com