+1
Daily
16,188
stars
3,333
forks
258
watchers
457
prs
832
issues
0
releases
README
openvpn-install OpenVPN installer for Debian, Ubuntu, Fedora, openSUSE, CentOS, Amazon Linux, Arch Linux, Oracle Linux, Rocky Linux and AlmaLinux. This script will let you setup and manage your own secure VPN server in just a few seconds. What is this? This script is meant to be run on your own server, whether it's a VPS or a dedicated server, or even a computer at home. Once set up, you will be able to generate client configuration files for every device you want to connect. Internet routing, access between VPN clients, and access to selected server-side networks can be configured independently. By default, internet routing is enabled and the other paths are disabled. mermaid flowchart LR A[Phone] --|Encrypted| VPN B[Laptop] --|Encrypted| VPN C[Computer] --|Encrypted| VPN VPN[OpenVPN Server] VPN --|Internet routingDefault: enabled| I[Internet] VPN -.-|Explicit CIDRs onlyDefault: disabled| LAN[Home LAN or cloud VPC] VPN -.-|Client-to-client accessDefault: disabled| PEERS[Other VPN clients] The solid destination path is enabled by default. Dashed destination paths are opt-in. Why OpenVPN? OpenVPN was the de facto standard for open-source VPNs when this script was created. WireGuard came later and is simpler and faster for most use cases. Check out wireguard-install. That said, OpenVPN still makes sense when you need: - TCP support: works in restrictive environments where UDP is blocked (corporate networks, airports, hotels, etc.) - Password-protected private keys: WireGuard configs store the private key in plain text - Legacy compatibility: clients exist for pretty much every platform, including older systems Features - Installs and configures a ready-to-use OpenVPN server - CLI interface for automation and scripting (non-interactive mode with JSON output) - Certificate renewal for both client and server certificates - List and monitor connected clients - Immediate client disconnect on certificate revocation (via management interface) - Uses official OpenVPN repositories when possible for the latest stable releases - Firewall rules and forwarding managed seamlessly (native firewalld and nftables support, iptables fallback) - Independent access policies for internet routing, communication between VPN clients, and selected server-side networks - Configurable VPN subnets (IPv4: default 10.8.0.0/24, IPv6: default fd42:42:42:42::/112) - Configurable tunnel MTU (default: 1500) - If needed, the script can cleanly remove OpenVPN, including configuration and firewall rules - Customisable encryption settings, enhanced default settings (see Security and Encryption below) - Uses latest OpenVPN features when available (see Security and Encryption below) - Variety of DNS resolvers to be pushed to the clients - Choice to use a self-hosted resolver with Unbound (supports already existing Unbound installations) - Choice between TCP and UDP - Flexible IPv4/IPv6 support: - IPv4 or IPv6 server endpoint (how clients connect) - I
Top issues
#1468Doesn't work on Debian 133 comments · 2026-02-11#1460This broke openvpn server creation on Ubuntu 24.04 Virtual Machines3 comments · 2026-01-29#1486Retry apt commands during lock1 comments · 2026-03-31#1478default client config contains DEPRECATED OPTION and treating option1 comments · 2026-03-05#1513[Feature Request] Multi clients management0 comments · 2026-08-19#1507[BUG] Firewalld is incorrectly used, causing the commands to fail and the tunnel to fail to set up0 comments · 2026-08-04#1506[BUG] Debian 13; iptables is added breaking nftables installs0 comments · 2026-08-04#1484Client file fails to import in Linux Mint Network Manager0 comments · 2026-03-25
Discussions
#1522scripts for Yealink Phone0 comments · 2026-10-26#1518Getting the .ovpn onto a phone (OpenVPN Connect URL import) seamlessly0 comments · 2026-09-22#1501Access to local LAN's2 comments · 2026-07-06#1499Updating old installation0 comments · 2026-07-02#1482Obfuscated Proxy0 comments · 2026-03-19#1474[ERROR] Installing OpenVPN failed with exit code 1001 comments · 2026-02-28#1472OpenVPN v2.7 support1 comments · 2026-02-17#1464How to make clients addressable to each other by hostname?0 comments · 2026-02-04