The easiest way to set up an OpenVPN server, the script is very helpful to manage the client keys
First, we need to download the script, then make it executable and run with bash
wget https://git.io/vpn -O openvpn-install.sh
chmod +x openvpn-install.sh
Following will be output and options to choose to create the VPN server and Client Certificates.
Welcome to this OpenVPN road warrior installer!
Which protocol should OpenVPN use?
1) UDP (recommended)
Protocol : 1
What port should OpenVPN listen to?
Select a DNS server for the clients:
1) Current system resolvers
DNS server : 2
Enter a name for the first client:
Name [client]: rahul
OpenVPN installation is ready to begin.
Press any key to continue...
The client configuration is available in: /root/XXXX.ovpn
New clients can be added by running this script again.
Once the client configuration is done we can copy it and move it to the device we need to use as the client. Configure the Ovpn client app with the client key and can start using the VPN.