Back to tutorials
Key takeaways
- A self-hosted OpenVPN server creates an encrypted tunnel that protects your traffic on untrusted networks (public Wi-Fi) and gives you access to the remote network's resources as if you were physically there. Non-negotiable prerequisite: a static IP address on the server.
- Manual configuration (certificate authority, keys, firewall rules, routing) is instructive but long and easy to get wrong. Nyr's script runs the whole sequence: installation, CA, server keys, first client, firewall and service startup.
- The wizard asks five questions: the public IP (auto-detected), the protocol (
UDPis generally faster), the port (1194by default), the DNS servers, and the name of the first client. It produces a client configuration file such as/root/my-laptop.ovpn. - That
.ovpnfile is the only thing to move to the client, viascp. It is then imported as-is into the official OpenVPN Community client (Windows), Tunnelblick (macOS), OpenVPN Connect (Android/iOS), or theopenvpnpackage / NetworkManager on Linux. - To manage the lifecycle of your accesses, you simply re-run
sudo ./openvpn-install.sh: the script detects the existing installation and offers a menu to add or revoke a user, or to uninstall OpenVPN.
What is a VPN?
A VPN (Virtual Private Network) creates a secure, encrypted "tunnel" for your internet traffic. This protects your data from prying eyes on unsecured networks (such as public Wi-Fi) and lets you access resources on a remote network as if you were physically there. OpenVPN is one of the most robust and reliable solutions for creating a VPN server.
A VPN (Virtual Private Network) creates a secure, encrypted "tunnel" for your internet traffic. This protects your data from prying eyes on unsecured networks (such as public Wi-Fi) and lets you access resources on a remote network as if you were physically there. OpenVPN is one of the most robust and reliable solutions for creating a VPN server.
Why use OpenVPN?
- Open-Source and Audited: The code is public and has been audited multiple times.
- Highly Configurable: Offers very fine-grained control over encryption protocols, ports and network options.
- Cross-platform: Clients exist for virtually every operating system (Windows, macOS, Linux, Android, iOS).
- Solid Security: Uses the OpenSSL library and the TLS protocol for cutting-edge security.
Prerequisites
- A dedicated Linux server (Ubuntu/Debian recommended), which will be your VPN server.
- Root access or sudo privileges.
- A static IP address on the server.
Premium Content
This advanced tutorial is reserved for premium members.
9,90€ / month
- All advanced tutorials
- New content every week
- Progress tracking
- Cancel anytime