A shell script that installs and manages OpenVPN on common Linux distributions. It configures certificates, firewall rules, and client profiles on hardware you control.
Overview
Openvpn Install is an interactive and scriptable installer that turns a Linux machine into an OpenVPN server in minutes. It targets VPS instances, dedicated servers, or a home PC, and produces per-device client configuration files after setup.
The script installs a working server, renews certificates, lists and monitors connected clients, and can revoke access with immediate disconnect via the management interface. Firewall and forwarding are handled through firewalld, nftables, or iptables. You can route client internet traffic through the VPN, allow client-to-client traffic, or grant access to LAN subnets with optional NAT.
Network options include TCP or UDP, configurable IPv4 and IPv6 subnets and endpoints, tunnel MTU, DNS resolvers pushed to clients, Unbound as a resolver, password-protected client keys, and peer fingerprint authentication on newer OpenVPN releases. A non-interactive CLI mode supports automation with JSON output.
Supported distributions include Debian, Ubuntu, Fedora, CentOS Stream, Rocky, Alma, Oracle, Amazon Linux, Arch, and openSUSE on amd64 with systemd. The author notes OpenVPN when TCP or broad client compatibility matters compared with simpler modern VPN protocols.
Key features
- Interactive and CLI automation modes
- Client cert issue and revocation
- firewalld, nftables, iptables integration
- Dual-stack IPv4 and IPv6 options
- Configurable DNS and Unbound resolver
- TCP and UDP protocol choice
- Password-protected client private keys
- Peer fingerprint authentication option
Use cases
- Personal VPN on a rented Linux VPS
- Remote access to a home network
- VPN where UDP is blocked using TCP
- Scripted client provisioning at scale