OpenVPN allow you to browse internet securely. All connection from your PC are encrypted.
OpenVPN have two parts
- OpenVPN Server
- OpenVPN Cleint
OpenVPN Server
You need to install this on a dedicated or VPS that is always connected to internet.
You can download OpenVPN server from
http://openvpn.net/index.php/access-server/download-openvpn-as-sw.html
Always download latest software from above link.
For CentOS 7 64 bit, run
wget http://swupdate.openvpn.org/as/openvpn-as-2.0.10-CentOS7.x86_64.rpm rpm -ivh openvpn-as-2.0.10-CentOS7.x86_64.rpm
For Ubuntu 14.04 64 bit, run
wget http://swupdate.openvpn.org/as/openvpn-as-2.0.10-Ubuntu14.amd_64.deb dpkg -i openvpn-as-2.0.10-Ubuntu14.amd_64.deb
This will install OpenVPN server.
# rpm -ivh openvpn-as-2.0.10-CentOS6.x86_64.rpm Preparing... ########################################### [100%] 1:openvpn-as ########################################### [100%] The Access Server has been successfully installed in /usr/local/openvpn_as Configuration log file has been written to /usr/local/openvpn_as/init.log Please enter "passwd openvpn" to set the initial administrative password, then login as "openvpn" to continue configuration here: https://144.76.30.176:943/admin To reconfigure manually, use the /usr/local/openvpn_as/bin/ovpn-init tool. Access Server web UIs are available here: Admin UI: https://YOUR_SERVER_IP:943/admin Client UI: https://YOUR_SERVER_IP:943/ #
Now you can start, stop it with command
service openvpn start service openvpn stop
Access OpenVPN Control Panel
OpenVPN control panels are available at following URL
Admin UI: https://YOUR_SERVER_IP:943/admin
Client UI: https://YOUR_SERVER_IP:943/
Default User Name is openvpn
We need to set password for this account, for this, run
sudo passwd openvpn
Enter password two times.
Getting OpenVPN Configuration
You need to Login to Client UI of OpenVPN at
https://YOUR_SERVER_IP:943/
User: openvpn
Password: you set with “sudo passwd openvpn” command.
Now you can download OpenVPN configration file. The file name is
client.ovpn
Connecting to VPN on Windows
You need to install OpenVPN software on Windows, You will have software download link in Client UI. This software will able to use “client.ovpn” file to connect.
Connecting to VPN from Ubuntu
First you need to install OpenVPN software, this can be done with
sudo apt-get install openvpn
Now to connect, run
sudo openvpn --config client.ovpn
Run above command on the folder where you downloaded client.ovpn file.
To connect to OpenVPN using GUI you need to install
sudo apt-get install network-manager-openvpn
By default, ubuntu 14.04 won’t import client.ovpn file, hope they will fix it soon. For now you need to follow instructions at
http://tech.vg.no/2014/02/28/openvpn-configuration-files-ubuntus-network-manager/
One Response to Installing OpenVPN Server in Ubuntu/CentOS