Convert Figma logo to code with AI

Nyr logoopenvpn-install

OpenVPN road warrior installer for Ubuntu, Debian, AlmaLinux, Rocky Linux, CentOS and Fedora

18,964
4,874
18,964
5

Top Related Projects

Set up your own OpenVPN server on Debian, Ubuntu, Fedora, CentOS or Arch Linux.

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

Scripts to build your own IPsec VPN server, with IPsec/L2TP, Cisco IPsec and IKEv2

28,648

Set up a personal VPN in the cloud

23,174

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.

7,142

The Simplest VPN installer, designed for Raspberry Pi

Quick Overview

Nyr/openvpn-install is a shell script that automates the installation and configuration of OpenVPN on Linux systems. It simplifies the process of setting up a VPN server, making it accessible to users with limited technical expertise. The script handles various aspects of OpenVPN setup, including key generation, network configuration, and client management.

Pros

  • Easy to use, with a user-friendly interactive interface
  • Supports multiple Linux distributions (Ubuntu, Debian, CentOS, etc.)
  • Automates complex configuration tasks, reducing the chance of errors
  • Includes options for customizing VPN settings and managing clients

Cons

  • Limited to OpenVPN protocol only, not supporting other VPN technologies
  • May not be suitable for advanced users who require more granular control
  • Potential security risks if used without understanding the underlying configuration
  • Limited documentation for troubleshooting or advanced customization

Getting Started

To use the Nyr/openvpn-install script, follow these steps:

  1. Ensure you have root access to a supported Linux system.
  2. Download the script:
    wget https://git.io/vpn -O openvpn-install.sh
    
  3. Make the script executable:
    chmod +x openvpn-install.sh
    
  4. Run the script with root privileges:
    sudo ./openvpn-install.sh
    
  5. Follow the on-screen prompts to configure your OpenVPN server.

After installation, you can use the same script to add or remove clients, or uninstall OpenVPN if needed.

Competitor Comparisons

Set up your own OpenVPN server on Debian, Ubuntu, Fedora, CentOS or Arch Linux.

Pros of openvpn-install (angristan)

  • More frequent updates and active development
  • Additional features like custom DNS options and improved security settings
  • Better compatibility with newer operating systems

Cons of openvpn-install (angristan)

  • Potentially more complex for beginners due to additional options
  • May require more system resources due to enhanced features

Code Comparison

openvpn-install (Nyr):

#!/bin/bash
#
# https://github.com/Nyr/openvpn-install
#
# Copyright (c) 2013 Nyr. Released under the MIT License.

openvpn-install (angristan):

#!/bin/bash
#
# https://github.com/angristan/openvpn-install
#
# This script is based on the great work of Nyr and its contributors.

The main difference in the code snippets is the attribution and licensing information. Angristan's version acknowledges that it's based on Nyr's work, while Nyr's version includes a copyright notice and MIT License reference.

Both scripts are well-maintained and offer easy OpenVPN server setup. Angristan's fork provides more advanced features and frequent updates, making it suitable for users who need additional customization options. Nyr's original script remains a solid choice for those seeking a simpler, straightforward installation process.

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

Pros of docker-openvpn

  • Containerized solution, offering better isolation and easier deployment
  • Supports easy scaling and management in container orchestration environments
  • Provides a more consistent environment across different host systems

Cons of docker-openvpn

  • Requires Docker knowledge and infrastructure
  • May have a slightly higher resource overhead due to containerization
  • Less straightforward for users unfamiliar with Docker concepts

Code Comparison

openvpn-install:

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

# Rest of the script...

docker-openvpn:

FROM alpine:3.14

LABEL maintainer="Kyle Manna <kyle@kylemanna.com>"

# Install openvpn
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/community/" >> /etc/apk/repositories && \
    apk add --update openvpn iptables bash easy-rsa && \
    rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/*

# Needed by scripts
ENV OPENVPN /etc/openvpn
ENV EASYRSA /usr/share/easy-rsa
ENV EASYRSA_PKI $OPENVPN/pki
ENV EASYRSA_VARS_FILE $OPENVPN/vars

The openvpn-install script is a bash script designed for direct installation on the host system, while docker-openvpn uses a Dockerfile to create a containerized OpenVPN environment.

Scripts to build your own IPsec VPN server, with IPsec/L2TP, Cisco IPsec and IKEv2

Pros of setup-ipsec-vpn

  • Supports multiple VPN protocols (IPsec/L2TP, IPsec/XAuth, and Cisco IPsec)
  • Built-in support for both IPv4 and IPv6
  • Includes options for split tunneling and DDNS configuration

Cons of setup-ipsec-vpn

  • May require more complex client-side configuration
  • Less widespread client support compared to OpenVPN
  • Potentially more challenging to troubleshoot due to multiple protocols

Code Comparison

setup-ipsec-vpn:

wget https://git.io/vpnsetup -O vpnsetup.sh
sudo sh vpnsetup.sh

openvpn-install:

wget https://git.io/vpn -O openvpn-install.sh
sudo bash openvpn-install.sh

Both scripts offer straightforward installation processes, but setup-ipsec-vpn provides a more comprehensive VPN solution with multiple protocols, while openvpn-install focuses solely on OpenVPN, which may be simpler for some users to set up and manage.

setup-ipsec-vpn offers greater flexibility and protocol options, making it suitable for a wider range of devices and network configurations. However, openvpn-install's focus on a single protocol may result in easier troubleshooting and a more streamlined user experience for those who only need OpenVPN functionality.

28,648

Set up a personal VPN in the cloud

Pros of algo

  • Supports multiple VPN protocols (WireGuard, IPsec/IKEv2) for better flexibility and performance
  • Emphasizes security with stronger encryption defaults and regular security audits
  • Easier to set up and manage multiple users with a user-friendly CLI

Cons of algo

  • Less customizable than openvpn-install, with fewer configuration options
  • May have compatibility issues with older devices that don't support newer VPN protocols
  • Requires more system resources due to its comprehensive security features

Code comparison

algo:

def deploy(server, config, update, client_name, client_os):
    ansible_command = [
        "ansible-playbook",
        "main.yml",
        "-e", "@config.cfg",
        "--limit", server
    ]

openvpn-install:

newclient () {
    # Generates the custom client.ovpn
    cp /etc/openvpn/client-common.txt ~/$1.ovpn
    echo "<ca>" >> ~/$1.ovpn
    cat /etc/openvpn/easy-rsa/pki/ca.crt >> ~/$1.ovpn
    echo "</ca>" >> ~/$1.ovpn
}

The algo project uses Python and Ansible for deployment, while openvpn-install relies on bash scripting for configuration and client management. algo's approach offers more structure and maintainability, while openvpn-install provides a simpler, more lightweight solution.

23,174

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 (OpenVPN, WireGuard, Shadowsocks, etc.)
  • Provides additional security features like DNS leak prevention and firewall configuration
  • Automates the setup of a complete privacy-focused server with various services

Cons of Streisand

  • More complex setup process due to its comprehensive nature
  • Requires more server resources to run multiple services
  • May be overwhelming for users who only need a simple OpenVPN setup

Code Comparison

openvpn-install:

#!/bin/bash
# Simplified OpenVPN server installation
apt-get update
apt-get install openvpn easy-rsa -y

Streisand:

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

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

Streisand uses Ansible for automation, while openvpn-install relies on a bash script. Streisand's approach allows for more complex configurations and better maintainability, but openvpn-install's script is simpler and more straightforward for basic OpenVPN setups.

7,142

The Simplest VPN installer, designed for Raspberry Pi

Pros of PiVPN

  • Supports both OpenVPN and WireGuard protocols
  • User-friendly interface with guided setup process
  • Actively maintained with regular updates and community support

Cons of PiVPN

  • Limited to Raspberry Pi and Debian-based systems
  • May require more system resources due to additional features
  • Less customizable than a bare-bones script

Code Comparison

openvpn-install:

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

# Detect Debian users running the script with "sh" instead of bash
if readlink /proc/$$/exe | grep -q "dash"; then
    echo 'This installer needs to be run with "bash", not "sh".'
    exit
fi

PiVPN:

#!/usr/bin/env bash
# PiVPN: Simplest OpenVPN/WireGuard setup and management

# Must be root to install
if [[ $EUID -ne 0 ]]; then
    echo "This installer needs to be run with root privileges."
    exit 1
fi

Both scripts start with a shebang and perform initial checks. openvpn-install focuses on detecting the correct shell, while PiVPN checks for root privileges. PiVPN's code is more concise and modern, using [[ for conditionals and /usr/bin/env bash for improved portability.

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

New: wireguard-install is also available.

openvpn-install

OpenVPN road warrior installer for Ubuntu, Debian, AlmaLinux, Rocky Linux, CentOS and Fedora.

This script will let you set up your own VPN server in no more than a minute, even if you haven't used OpenVPN before. It has been designed to be as unobtrusive and universal as possible.

Installation

Run the script and follow the assistant:

wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh

Once it ends, you can run it again to add more users, remove some of them or even completely uninstall OpenVPN.

I want to run my own VPN but don't have a server for that

You can get a VPS from just 2€/month at AlphaVPS.

Donations

If you want to show your appreciation, you can donate via PayPal or cryptocurrency. Thanks!

Sponsors

This project is proudly sponsored by our friends at FrogeHost.

For a commercial VPN with strong anti-censorship capabilities (最强翻墙VPN) from $1/month, check out Clever VPN.