Skip to content
Bots!
Bots!
  • About
    • Myself
    • আমার দোয়া
  • Bookmarks
    • Bookmarks
    • My OCI Bookmarks
    • Useful Proxmox Commands & Links
    • Learning Nano
    • Useful Sites
    • Useful Virtualbox Command
    • Useful MySQL Command
    • Useful Linux Command
    • BTT-CAS
  • Resources
    • Webinar on Cloud Adoption for Project Managers
  • Photos
  • Videos
  • Downloads
Bots!

Install Pritunl on Ubuntu 16

Rumi, June 29, 2020

Update your bare-bone and freshly installed Ubuntu 16 system.

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

Add Pritunl’s APT repository and update the package lists:

echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" > /etc/apt/sources.list.d/mongodb-org-3.0.list
echo "deb http://repo.pritunl.com/stable/apt trusty main" > /etc/apt/sources.list.d/pritunl.list

Add repo keys for apt to validate against

apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv 7F0CEB10
apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv CF8E292A

Update the package cache

sudo apt-get update

If you have a firewall running on the Linode, add exceptions for Pritunl’s Web UI and server:

sudo iptables -A INPUT -p udp -m udp --sport 9700 --dport 1025:65355 -j ACCEPT
sudo iptables -A INPUT -p tcp -m tcp --sport 9700 --dport 1025:65355 -j ACCEPT
sudo iptables -A INPUT -p `your protocol here` -m `your protocol here` --sport `your_port_here` --dport 1025:65355 -j ACCEPT

NoteIf you’ve configured the firewall according to the Securing Your Server guide, be sure to add these port ranges to the /etc/iptables.firewall.rules file.

Install Pritunl and its required dependencies:

sudo apt-get install python-software-properties pritunl mongodb-org

Start the Pritunl service:

sudo service pritunl start

Open a web browser on your computer, and navigate to https://123.45.67.89:9700, replacing 123.45.67.89 with your VM IP address. You will see a screen similar to this:

Connect to the database. The installer has already populated the MongoDB URI. If it looks correct, click Save.

Tip:

If you see something different like your mongodb is not running, then probably you need to create the following script and run:

Create a configuration file named mongodb.service in /etc/systemd/system to manage the MongoDB service.

sudo vim /etc/systemd/system/mongodb.service
#Unit contains the dependencies to be satisfied before the service is started.
[Unit]
Description=MongoDB Database
After=network.target
Documentation=https://docs.mongodb.org/manual
# Service tells systemd, how the service should be started.
# Key `User` specifies that the server will run under the mongodb user and
# `ExecStart` defines the startup command for MongoDB server.
[Service]
User=mongodb
Group=mongodb
ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf
# Install tells systemd when the service should be automatically started.
# `multi-user.target` means the server will be automatically started during boot.
[Install]
WantedBy=multi-user.target

Update the systemd service with the command stated below:

systemctl daemon-reload

Start the service with systemcl.

sudo systemctl start mongodb

Check if mongodb has been started on port 27017 with netstat command:

netstat -plntu

Check if the service has started properly.

sudo systemctl status mongodb

The output to the above command will show `active (running)` status with the PID and Memory/CPU it is consuming. Enable auto start MongoDB when system starts.

sudo systemctl enable mongodb

Configuring Pritunl:

Login with the following information:

Username: pritunl
Password: pritunl

Or follow on screen instructions to generate user password.

The Initial Setup form will appear:

Fill out the form, and press Save.

Go to the Users tab. Here, you will create your organizations and users. Begin by clicking Add Organization and entering a name. Next, click Add User and add a user to the organization you just created.

Go to the Servers tab. Click Add server. You will see a screen like the following:

If a firewall is set up, make sure that the Port and Protocol fields match the firewall exceptions added earlier. Click the Attach Organization button. Attach the organization to the server.

Connecting to the Server

To connect to the server, you can use any OpenVPN compatible client. For Android or iOS, you can use the free OpenVPN Connect app available in the Google Play or iOS App Store. For Linux, there is an official client available for Ubuntu. Mac and Windows users can use any OpenVPN client.

You can download your required edition from the link below:

https://client.pritunl.com/

Increase Open File Limit

Run the commands below to increase the open file limit on the server. This will prevent connections issues on servers with high load. This should also be done on the MongoDB server. Use the command sudo lsof -p `pgrep pritunl-web` | wc -l to check the file count for the Pritunl web server.

Shell
sudo sh -c 'echo "* hard nofile 64000" >> /etc/security/limits.conf'
sudo sh -c 'echo "* soft nofile 64000" >> /etc/security/limits.conf'
sudo sh -c 'echo "root hard nofile 64000" >> /etc/security/limits.conf'
sudo sh -c 'echo "root soft nofile 64000" >> /etc/security/limits.conf'

Src:
https://hevodata.com/blog/install-mongodb-on-ubuntu/
https://www.linode.com/docs/networking/vpn/pritunl-vpn-ubuntu/
https://docs.pritunl.com/docs/installation

Administrations Configurations (Linux) PritunlUbuntu 16vpn

Post navigation

Previous post
Next post

Leave a Reply Cancel reply

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

Myself…

Hi, I am Hasan T. Emdad Rumi, an IT Project Manager & Consultant, Virtualization & Cloud Savvyfrom Dhaka, Bangladesh. I have prior experience in managing numerous local and international projects in the area of Telco VAS & NMC, National Data Center & PKI Naitonal Root and CA Infrastructure. Also engaged with several Offshore Software Development Team.

Worked with Orascom Telecom-Banglalink, Network Elites as VAS partner, BTRC, BTT (Turkey) , Mango Teleservices Limited and Access to Informaiton (A2I-UNDP)

Currently working at Oracle Corporation as Principal Technology Solution and Cloud Architect.

You can reach me [h.t.emdad at gmail.com] and I will be delighted to exchange my views.

Tags

Apache Bind Cacti CentOS CentOS 6 CentOS 7 Debain Debian Debian 10 Debian 11 Debian 12 DKIM Docker endian icinga iptables Jitsi LAMP Letsencrypt Linux Munin MySQL Nagios Nextcloud NFS nginx pfsense php Postfix powerdns Proxmox RDP squid SSH SSL Ubuntu Ubuntu 16 Ubuntu 18 Ubuntu 20 Varnish virtualbox vpn Webmin XCP-NG zimbra

Topics

Recent Posts

  • Install Jitsi on Ubuntu 22.04 / 22.10 April 30, 2025
  • Key Lessons in life April 26, 2025
  • Create Proxmox Backup Server (PBS) on Debian 12 April 19, 2025
  • Add Physical Drive in Proxmox VM Guest April 19, 2025
  • Mount a drive permanently with fstab in Linux April 16, 2025
  • Proxmox 1:1 NAT routing March 30, 2025
  • Installation steps of WSL – Windows Subsystem for Linux March 8, 2025
  • Enabling Nested Virtualization In Proxmox March 8, 2025
  • How to Modify/Change console/SSH login banner for Proxmox Virtual Environment (Proxmox VE / PVE) March 3, 2025
  • Install Proxmox Backup Server on Debian 12 February 12, 2025

Archives

Top Posts & Pages

  • Install Jitsi on Ubuntu 22.04 / 22.10
©2025 Bots! | WordPress Theme by SuperbThemes