How to Install OpenVPN on Centos 6
I've successfully installed OpenVPN at one of my VPS, but failed to install it on another server. I believe I could find any configuration mistake, but the time won't allow it. Client just want a quick result. So I decided to use a OpenVPN installer script on https://github.com/Nyr/openvpn-install.
As mentioned on their page, this script will let you setup your own VPN server in no more than a minute, even if you haven't used OpenVPN before. It has been designed to be as unobtrusive and universal as possible.
$ wget https://git.io/vpn -O openvpn-install.sh
Once download completed, make it executable and run it.
$ chmod +x openvpn-install.sh
$ sudo ./openvpn-install.sh
The script will asks few questions and you can fill it with anything. It will generate OpenVPN client configuration file in
/root/client.ovpn. Download this file to your client.
OpenVPN Server Configuration
If you want to share single client to multiple devices, then you need to update OpenVPN server configuration on
$ sudo vi /etc/openvpn/server.conf
Add this line:
Save the file and exit.
Starting OpenVPN Server
Finally, start the OpenVPN server.
$ sudo service openvpn start
$ sudo chkconfig openvpn on
Client Configuration - Linux
client.ovpn file from your server and run this command on your terminal:
$ sudo openvpn path/to/downloaded/client.ovpn
Client Configuration - Android
On android devices, we'll use official OpenVPN apps. To install OpenVPN apps, open Google Play and search for OpenVPN. Like any other apps, just click "Install" to install it on your android device.
Next step is download
client.ovpn file from your server and import it to OpenVPN apps you've just installed.
I hope that you now know how to install OpenVPN Server on Centos. If you run into any issues or have any feedback feel free to drop a comment below.