
How to install OpenVPN in seconds!
There is a great script on GitHub that allows you to install OpenVPN for Debian, Ubuntu, Fedora, CentOS, Arch Linux, Oracle Linux, Rocky Linux and AlmaLinux in seconds.
Install OpenVPN
First, get the script and make it executable:
curl -O https://raw.githubusercontent.com/angristan/openvpn-install/master/openvpn-install.sh
chmod +x openvpn-install.sh
Now we can run it:
./openvpn-install.sh
This script must be run as root and with the TUN module (included in most Linux distros) enabled.
It will ask a few questions when you run it for the first time to configure your VPN server.
As soon as OpenVPN is installed, you can run the script again, and you will be given the option to:
- Add a client
- Remove a client
- Uninstall OpenVPN
You will find .ovpn files in your home directory. These files contain the client configuration. Download them from your server and use your favourite OpenVPN software to connect.
Here’s what the script looks like:
[root@vpn ~]# ./openvpn-install.sh
Welcome to OpenVPN-install!
The git repository is available at: https://github.com/angristan/openvpn-install
It looks like OpenVPN is already installed.
What do you want to do?
1) Add a new user
2) Revoke existing user
3) Remove OpenVPN
4) Exit
Connect to the OpenVPN
First, download the OpenVPN client for your device:
- Windows: OpenVPN
- Mac: Tunnelblick
- Linux: OpenVPN
- iPhone: OpenVPN Connect
- Android: OpenVPN for Android
Next, open your VPN and import the .ovpn file that was created during the Add User process.
That’s it!