Convert Figma logo to code with AI

pritunl logopritunl

Enterprise VPN server

4,591
621
4,591
11

Top Related Projects

10,355

Netmaker makes networks with WireGuard. Netmaker automates fast, secure, and distributed virtual networks.

Historical monolithic WireGuard repository, split into wireguard-tools, wireguard-linux, and wireguard-linux-compat.

29,343

Set up a personal VPN in the cloud

23,292

Streisand sets up a new server running your choice of WireGuard, OpenConnect, OpenSSH, OpenVPN, Shadowsocks, sslh, Stunnel, or a Tor bridge. It also generates custom instructions for all of these services. At the end of the run you are given an HTML file with instructions that can be shared with friends, family members, and fellow activists.

Set up your own OpenVPN server on Debian, Ubuntu, Fedora, CentOS, Arch Linux and more

🔒 OpenVPN server in a Docker container complete with an EasyRSA PKI CA

Quick Overview

Pritunl is an open-source VPN server and management platform. It provides a user-friendly web interface for managing OpenVPN connections and offers features like multi-factor authentication, single sign-on, and detailed user activity logs. Pritunl is designed to be easily deployed and scalable for both small and large organizations.

Pros

  • Easy to set up and manage through a web-based interface
  • Supports multi-factor authentication and single sign-on
  • Highly scalable and can be distributed across multiple servers
  • Integrates with various cloud platforms and identity providers

Cons

  • Limited support for protocols other than OpenVPN
  • Some advanced features require a paid subscription
  • Documentation can be sparse for certain advanced configurations
  • May require additional setup for high-availability deployments

Getting Started

To get started with Pritunl, follow these steps:

  1. Install Pritunl on your server:
sudo tee /etc/apt/sources.list.d/pritunl.list << EOF
deb https://repo.pritunl.com/stable/apt focal main
EOF

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv 7568D9BB55FF9E5287D586017AE645C0CF8E292A
sudo apt-get update
sudo apt-get install pritunl mongodb-server
sudo systemctl start pritunl mongodb
sudo systemctl enable pritunl mongodb
  1. Access the web interface by navigating to https://your-server-ip in a web browser.

  2. Follow the setup wizard to configure your initial settings and create your first organization and user.

  3. Download the Pritunl client for your operating system from the official website.

  4. Import the configuration file generated for your user and connect to the VPN.

For more detailed instructions and advanced configurations, refer to the official Pritunl documentation.

Competitor Comparisons

10,355

Netmaker makes networks with WireGuard. Netmaker automates fast, secure, and distributed virtual networks.

Pros of Netmaker

  • Focuses on creating and managing mesh networks, offering more flexibility for complex network topologies
  • Supports multiple platforms including Linux, Windows, macOS, and mobile devices
  • Utilizes WireGuard for improved performance and security

Cons of Netmaker

  • Relatively newer project with a smaller community compared to Pritunl
  • May require more technical knowledge to set up and configure effectively
  • Limited built-in user management features compared to Pritunl's more comprehensive approach

Code Comparison

Netmaker (Go):

func (network *Network) GetNetworkNodes() ([]models.Node, error) {
    var nodes []models.Node
    collection, err := database.FetchRecords(database.NODES_TABLE_NAME)
    if err != nil {
        return nil, err
    }
    // ... (additional code)
}

Pritunl (Python):

def get_by_id(self, id, fields=None):
    return self.collection.find_one({
        '_id': id,
    }, fields)

def get_full(self, id):
    return self.get_by_id(id)

Both projects use different programming languages and have distinct approaches to network management. Netmaker focuses on mesh networks using WireGuard, while Pritunl provides a more traditional VPN solution with additional features for user management and access control.

Historical monolithic WireGuard repository, split into wireguard-tools, wireguard-linux, and wireguard-linux-compat.

Pros of WireGuard

  • Lightweight and efficient protocol, offering better performance
  • Simpler codebase, making it easier to audit and maintain
  • Built-in kernel support in modern Linux distributions

Cons of WireGuard

  • Limited built-in management features compared to Pritunl
  • Less flexibility in terms of authentication methods
  • Steeper learning curve for non-technical users

Code Comparison

WireGuard configuration example:

[Interface]
PrivateKey = <private_key>
Address = 10.0.0.1/24
ListenPort = 51820

[Peer]
PublicKey = <public_key>
AllowedIPs = 10.0.0.2/32

Pritunl configuration example:

{
    "name": "example_server",
    "type": "server",
    "network": "10.0.0.0/24",
    "port": 1194,
    "protocol": "udp",
    "cipher": "aes-256-cbc"
}

WireGuard focuses on simplicity and efficiency, while Pritunl offers more comprehensive management features. WireGuard's configuration is more straightforward, but Pritunl provides a more user-friendly interface for managing complex VPN setups. Both have their strengths, with WireGuard excelling in performance and simplicity, and Pritunl offering more advanced features and easier management for larger deployments.

29,343

Set up a personal VPN in the cloud

Pros of Algo

  • Focuses on simplicity and ease of use for non-technical users
  • Emphasizes strong security practices and modern encryption protocols
  • Supports multiple cloud providers out-of-the-box

Cons of Algo

  • Limited to IPsec/IKEv2 and WireGuard protocols
  • Less flexible for advanced configurations or customizations
  • Smaller community and fewer enterprise-focused features

Code Comparison

Algo (setup.sh):

#!/usr/bin/env bash

set -e
set -u

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

Pritunl (setup.py):

from setuptools import setup
import os
import sys
import copy
import shlex
import shutil
import fileinput

Both projects use different languages for their setup scripts, reflecting their distinct approaches. Algo's bash script focuses on simplicity, while Pritunl's Python setup allows for more complex configurations.

23,292

Streisand sets up a new server running your choice of WireGuard, OpenConnect, OpenSSH, OpenVPN, Shadowsocks, sslh, Stunnel, or a Tor bridge. It also generates custom instructions for all of these services. At the end of the run you are given an HTML file with instructions that can be shared with friends, family members, and fellow activists.

Pros of Streisand

  • Supports multiple VPN protocols and services out of the box
  • Automated setup process for various cloud providers
  • Includes additional privacy-enhancing tools like Tor and Shadowsocks

Cons of Streisand

  • Less actively maintained compared to Pritunl
  • May require more technical knowledge to customize or troubleshoot
  • Limited user management features for multi-user setups

Code Comparison

Streisand (Ansible playbook snippet):

- name: Install OpenVPN
  apt:
    name: openvpn
    state: present

- name: Generate OpenVPN configuration
  template:
    src: openvpn-server.conf.j2
    dest: /etc/openvpn/server.conf

Pritunl (Python snippet):

from pritunl import settings
from pritunl import logger

def setup_openvpn():
    settings.local.openvpn_server = True
    logger.info('OpenVPN server enabled', 'setup')

Both projects aim to simplify VPN deployment, but they take different approaches. Streisand uses Ansible for automation across multiple services, while Pritunl focuses on a more integrated, user-friendly solution specifically for OpenVPN. Streisand offers broader protocol support and additional privacy tools, making it suitable for users seeking a comprehensive privacy setup. Pritunl, on the other hand, provides a more polished, actively maintained solution with better user management features, making it ideal for organizations requiring a robust OpenVPN server with easier administration.

Set up your own OpenVPN server on Debian, Ubuntu, Fedora, CentOS, Arch Linux and more

Pros of openvpn-install

  • Simple, single-script installation process
  • Lightweight and easy to customize
  • Supports a wide range of Linux distributions

Cons of openvpn-install

  • Limited user management features
  • Lacks a graphical user interface
  • Requires manual configuration for advanced setups

Code Comparison

openvpn-install:

#!/bin/bash
# OpenVPN installer for Debian, Ubuntu, and CentOS

# Function to install OpenVPN
install_openvpn() {
    # Installation steps
}

Pritunl:

from pritunl import app
from pritunl import settings

def run_server():
    app.run(debug=False, host=settings.conf.bind_addr, port=settings.conf.port)

if __name__ == '__main__':
    run_server()

The openvpn-install project is a single Bash script that automates the installation and configuration of OpenVPN on various Linux distributions. It's straightforward and easy to use but lacks advanced features.

Pritunl, on the other hand, is a more comprehensive VPN server solution written in Python. It offers a web-based interface, user management, and more advanced features, making it suitable for larger deployments and organizations requiring more control over their VPN infrastructure.

While openvpn-install is ideal for quick, simple setups, Pritunl provides a more robust and scalable solution for managing VPN servers and users.

🔒 OpenVPN server in a Docker container complete with an EasyRSA PKI CA

Pros of docker-openvpn

  • Containerized solution, offering easier deployment and isolation
  • Lightweight and focused solely on OpenVPN functionality
  • Highly customizable through environment variables and volume mounts

Cons of docker-openvpn

  • Requires Docker knowledge and infrastructure
  • Limited built-in user management features
  • May require additional setup for advanced features like multi-factor authentication

Code Comparison

docker-openvpn:

docker run -v $PWD:/etc/openvpn --rm kylemanna/openvpn ovpn_genconfig -u udp://VPN.SERVERNAME.COM
docker run -v $PWD:/etc/openvpn --rm -it kylemanna/openvpn ovpn_initpki
docker run -v $PWD:/etc/openvpn -d -p 1194:1194/udp --cap-add=NET_ADMIN kylemanna/openvpn

Pritunl:

from pritunl import settings
from pritunl import app
from pritunl import setup
from pritunl import logger
from pritunl import __version__

setup.setup_all()
app.run_server()

The docker-openvpn code snippet shows the Docker commands to generate configs, initialize PKI, and run the OpenVPN server. The Pritunl code demonstrates the Python-based setup and server initialization process, highlighting the different approaches to VPN server management between the two projects.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

pritunl: enterprise vpn server

github twitter medium forum

Pritunl is a distributed enterprise vpn server built using the OpenVPN protocol. Documentation and more information can be found at the home page pritunl.com

pritunl

Install From Source

# Install MongoDB if running single host configuration
sudo tee /etc/yum.repos.d/mongodb-org.repo << EOF
[mongodb-org-8.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/9/mongodb-org/8.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://pgp.mongodb.com/server-8.0.asc
EOF

sudo yum -y install mongodb-org
sudo systemctl start mongod
sudo systemctl enable mongod

# Set current pritunl version X.XX.XXXX.XX
# Set to master to run code from repository (only for testing)
export VERSION="master"

# RHEL EPEL
sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
# Oracle Linux EPEL
sudo yum -y install oracle-epel-release-el9
sudo yum-config-manager --enable ol9_developer_EPEL

sudo yum -y install openssl-devel bzip2-devel libffi-devel sqlite-devel xz-devel zlib-devel gcc git openvpn openssl net-tools iptables psmisc ca-certificates selinux-policy selinux-policy-devel wget tar policycoreutils-python-utils

wget https://www.python.org/ftp/python/3.9.21/Python-3.9.21.tar.xz
echo "3126f59592c9b0d798584755f2bf7b081fa1ca35ce7a6fea980108d752a05bb1 Python-3.9.21.tar.xz" | sha256sum -c -

tar xf Python-3.9.21.tar.xz
cd ./Python-3.9.21
mkdir /usr/lib/pritunl
./configure --prefix=/usr --libdir=/usr/lib --enable-optimizations --enable-ipv6 --enable-loadable-sqlite-extensions --disable-shared --with-lto --with-platlibdir=lib
make DESTDIR="/usr/lib/pritunl" install
/usr/lib/pritunl/usr/bin/python3 -m ensurepip --upgrade
/usr/lib/pritunl/usr/bin/python3 -m pip install --upgrade pip

wget https://go.dev/dl/go1.23.6.linux-amd64.tar.gz
echo "9379441ea310de000f33a4dc767bd966e72ab2826270e038e78b2c53c2e7802d go1.23.6.linux-amd64.tar.gz" | sha256sum -c -

sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xf go1.23.6.linux-amd64.tar.gz
rm -f go1.23.6.linux-amd64.tar.gz

tee -a ~/.bashrc << EOF
export GOPATH=\$HOME/go
export PATH=/usr/local/go/bin:\$PATH
EOF
source ~/.bashrc

sudo systemctl stop pritunl || true
sudo rm -rf /usr/lib/pritunl

sudo mkdir -p /usr/lib/pritunl
sudo mkdir -p /var/lib/pritunl
sudo virtualenv-3 /usr/lib/pritunl

GOPROXY=direct go install github.com/pritunl/pritunl-web@latest
GOPROXY=direct go install github.com/pritunl/pritunl-dns@latest
sudo rm /usr/bin/pritunl-dns
sudo rm /usr/bin/pritunl-web
sudo cp -f ~/go/bin/pritunl-dns /usr/bin/pritunl-dns
sudo cp -f ~/go/bin/pritunl-web /usr/bin/pritunl-web

go get -v -u github.com/pritunl/pritunl-dns
go get -v -u github.com/pritunl/pritunl-web
sudo cp -f ~/go/bin/pritunl-dns /usr/bin/pritunl-dns
sudo cp -f ~/go/bin/pritunl-web /usr/bin/pritunl-web

wget https://github.com/pritunl/pritunl/archive/$VERSION.tar.gz
tar xf $VERSION.tar.gz
rm $VERSION.tar.gz
cd ./pritunl-$VERSION
/usr/lib/pritunl/bin/python setup.py build
sudo /usr/lib/pritunl/usr/bin/pip3 install --require-hashes -r requirements.txt
sudo /usr/lib/pritunl/usr/bin/python3 setup.py install
sudo ln -sf /usr/lib/pritunl/usr/bin/pritunl /usr/bin/pritunl

cd selinux8
ln -s /usr/share/selinux/devel/Makefile
make
sudo make load
sudo cp pritunl.pp /usr/share/selinux/packages/pritunl.pp
sudo cp pritunl_dns.pp /usr/share/selinux/packages/pritunl_dns.pp
sudo cp pritunl_web.pp /usr/share/selinux/packages/pritunl_web.pp

sudo semodule -i /usr/share/selinux/packages/pritunl.pp /usr/share/selinux/packages/pritunl_dns.pp /usr/share/selinux/packages/pritunl_web.pp
sudo restorecon -v -R /tmp/pritunl* || true
sudo restorecon -v -R /run/pritunl* || true
sudo restorecon -v /etc/systemd/system/pritunl.service || true
sudo restorecon -v /usr/lib/systemd/system/pritunl.service || true
sudo restorecon -v /etc/systemd/system/pritunl-web.service || true
sudo restorecon -v /usr/lib/systemd/system/pritunl-web.service || true
sudo restorecon -v /usr/lib/pritunl/bin/pritunl || true
sudo restorecon -v /usr/lib/pritunl/bin/python || true
sudo restorecon -v /usr/lib/pritunl/bin/python3 || true
sudo restorecon -v /usr/lib/pritunl/bin/python3.6 || true
sudo restorecon -v /usr/lib/pritunl/bin/python3.9 || true
sudo restorecon -v /usr/lib/pritunl/usr/bin/pritunl || true
sudo restorecon -v /usr/lib/pritunl/usr/bin/python || true
sudo restorecon -v /usr/lib/pritunl/usr/bin/python3 || true
sudo restorecon -v /usr/lib/pritunl/usr/bin/python3.6 || true
sudo restorecon -v /usr/lib/pritunl/usr/bin/python3.9 || true
sudo restorecon -v /usr/bin/pritunl-web || true
sudo restorecon -v /usr/bin/pritunl-dns || true
sudo restorecon -v -R /var/lib/pritunl || true
sudo restorecon -v /var/log/pritunl* || true

sudo groupadd -r pritunl-web || true
sudo useradd -r -g pritunl-web -s /sbin/nologin -c 'Pritunl web server' pritunl-web || true

cd ../../
sudo rm -rf ./pritunl-$VERSION

sudo systemctl daemon-reload
sudo systemctl start pritunl
sudo systemctl enable pritunl

License

Please refer to the LICENSE file for a copy of the license.