Install and configure the OpenVPN on CentOS6.x


To install the Openvpn on CentOS6.x we have to install the certain packages along openvpn like NetworkManager for VPN.



- Get the latest repository of packages

[root@test ~]# wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

- Install that repository if it is not already installed

[root@test ~]# rpm -ivh epel-release-6-8.noarch.rpm 

- Packages for openvpn plugins aswell as other plugins like point to point tunnel and Cisco VPN client.

[root@test ~]# yum install pptp NetworkManager-pptp* -y 
[root@test ~]# yum install pptp NetworkManager-vpnc* -y
[root@test ~]# yum install pptp NetworkManager-openvpn* -y
[root@test ~]# yum install NetworkManager* -y

- Start the OpenVPN service and also enable it for every time usage

[root@test ~]# service openvpn start
[root@test ~]# chkconfig openvpn on

We have two options to run OpenVPN either we can run on terminal or on GUI VPN Connections. 

Terminal:

On terminal go to the folder where openvpn configuration files are located. Below is the example structure

[root@test ~]# cd ~/openvpn-config 

[root@test ~]# openvpn company.ovpn  (After this command it will ask the credentials)

After that it will give the IP address for the tap adapter and we can access the resources we want to on that network.

CentOS6.x Desktop:

- Go to Network Connections icon and select the VPN connections then click on the Configure VPN.. tab.


- Go to the bottom and select the Import a saved VPN configuration



- Choose the folder where the openvpn configuration is placed and select the .ovpn file.



- Give the Getaway if it doesn't automatically get and credentials or any other details. Save the configuration and run the VPN connection from the Network Connection icon. It will ask again for password and then will connect.

  











Comments

  1. This is very helpful. Please update how to install openvpn in centos 7.

    ReplyDelete

Post a Comment

Please give your review or ask question ?