Friday, 25 March 2016

thumbnail

How-to-install-and-configure-Openvpn-Access-Server-on-CentOS-6/7

Introduction

OpenVPN-Access-server is a robust and highly flexible tunneling application that uses all of the encryption, authentication, and certification features of the OpenSSL library to securely tunnel IP networks over a single TCP/UDP port.

In this tutorial, we will setup OpenVPN-Access-server on CentOS-7, and connect from a remote client. 

1. First of all we need to download the package from below link :-

wget http://swupdate.openvpn.org/as/openvpn-as-2.0.25-CentOS7.x86_64.rpm 

2. Then we will install the package as root :-

rpm -Uvh openvpn-as-2.0.25-CentOS7.x86_64.rpm

3. After installation is complete you have to setup the password :-

passwd openvpn

4. Now you can access the GUI from the browser :-

Enter you server IP where you have installed the package. In my case my IP is 192.168.15.98. It is a private IP address for testing purpose but you can install on Public server or on your Production server.


You can also use private IP in your OpenVPN-access-server. After installation you will have to forward port 1194 TCP/UDP to your private IP from your router. In the client config file you have to change the Private IP to your external PUBLIC IP so that anybody who is requesting from outside your network will be able to reach your OpenVPN server. I will so you how to change the IP address.


We will access the server with below link :-

https://192.168.15.98:943/admin



Username = openvpn
Password = *******  ( Is what you have set earlier)



As you can see above we have successfully installed the server.

5. Now we have to get the client certificate :-

https://192.168.15.98:943

Open the above link without admin will allow us to download client config file.



Now login with the same credential you logged in admin panel.

Username = openvpn
Password = *******



As you can see in the above image configuration file different OS is available just click on it to download the file.

Now as I told you to modify the file for external network. Here you will have to change the IP address in  client.ovpn file.

# vim client.ovpn 

remote 1.1.1.1 1194 udp  <==== Replace it with your public ip  

save& exit 



And forward the port 1194 UDP to private ip address of your openvpn-access-server.

6. Now i will show you how to connect to the server :-

yum install openvpn

Then the type following command to connect :-

openvpn --config client.ovpn

Remember you will have to be root to connect 








As you can see in the above image the tunnel has been created.

That's it 
Enjoy using openvpn access server.
Please do Comments,Like and Share .


Subscribe by Email

Follow Updates Articles from This Blog via Email

No Comments