In the present society, security and protection remain an issue when you are in open areas like airports, coffee shops, hotels, or any area that offers free open WiFi. hackers can monitor your web traffic and private details between your PC and the web through the public wifi. OpenVPN is an open-source application that executes a virtual private network, which will make a secure connection among you and your web browsers.

This tutorial will show you how to install and setup OpenVPN on CentOS 7 with OpenVPN Access Server. OpenVPN Access Server is a fully-featured application that includes a web front-end for managing an OpenVPN server.

Step 1: Install net-tools 

CentOS 7 doesn't include ifconfig which is found within the net-tools package. OpenVPN requires ifconfig so as to properly operate. Run the subsequent commands on your server to put in net-tools:

yum update
yum install net-tools

Step 2: Download OpenVPN

 Download the RPM for OpenVPN. Run the following command:

cd /tmp
wget http://swupdate.openvpn.org/as/openvpn-as-2.0.10-CentOS7.x86_64.rpm

Step 3: Install and Setup OpenVPN

rpm -Uvh openvpn-as-2.0.10-CentOS7.x86_64.rpm 
 
If your installation was successful, you should see the following (Replace 0.0.0.0 accordingly):
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://0.0.0.0: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://0.0.0.0:943/admin
Client UI: https://0.0.0.0:943/


Once you see this message, you will have to run a password OpenVPN to change the password to the account. Following that, open your browser and navigate to https://0.0.0.0:943/

you'll be presented with a login screen, On the login screen continue logging in with the

username used for OpenVPN password that you used with the password command. Once you're logged in, you'll see 6 links. Click on the last link, this may allow you to download your VPN profile which allows you to set up your VPN client.

Next, click on the admin button and login with an equivalent username and password that you simply have entered previously. Once you're in, and you've got read and agreed with the terms, you get on a page that shows your server status. If the status is off, press the start the Server button to show the VPN server on. If no errors occurred, you'll see Server Started with the status being On. Now you're able to continue to the following step;

Step 4: Using OpenVPN on Your Computer
Depending on your OS or device, your setup are going to be different. From here forward, this tutorial provides setups for users of Ubuntu 14.04. If you're using the other OS or device, please follow one among the links located on https://0.0.0.0:943, once you are logged in.

On your PC open up terminal and run:

sudo apt-get install openvpn

This command will install the VPN client software. The VPN client software create a connection between your computer and the VPN. Once it has finished downloading, you will want to check to make sure that it is installed by running it for test:

openvpn –version

Upon success, you will see a similar output printed on your screen:

OpenVPN 2.3.2 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [eurephia] [MH] [IPv6] built on jul 17 2020

You have installed OpenVPN on your computer. Next, run the following command:

sudo openvpn --config /path/to/client.ovpn

This will prompt you to enter the username and password of your VPN. After logging in, your computer will be connected to your VPN. To verify your VPN connection, visit your favorite search engine and type "IP address". You will be presented with a list of websites that show your current IP address (some search engines will even include your IP in the search results). Confirm your current IP address. If your IP address displayed is different from the IP address assigned to you by your ISP, then you have successfully connected to your VPN server.

 
 
Was this answer helpful? 0 Users Found This Useful (0 Votes)