How to configure OpenVPN on CentOS?

This guide will guide you through the setup of OpenVPN connection on CentOS. For demonstration purposes, we are using CentOS Linux 8.

To set up OpenVPN on CentOS, you will need

  • A secure FastVPN connection (Don’t have one? Sign up for VPN here!);
  • An internet connection;
  • Access to your FastVPN account panel in order to get your network credentials and server list.
Follow the steps below to configure OpenVPN on CentOS:

1. Access the Terminal on your CentOS machine. Switch to a root user and enter the following commands to install the OpenVPN plugin for Network Manager:

  • su -

    Enter your root password and press Enter.

  • yum -y install epel-release

    A screenshot of the terminal screen in CentOS Linux 8

    Press Enter.

  • sudo yum -y install NetworkManager-openvpn NetworkManager-openvpn-gnome

    A green arrow points to yum dash y install

    Press Enter.
2. The next step is to get the ovpn configuration files.

Enter the following command to select a folder for FastVPN configs:

cd ~/Downloads

A green arrow points to the word Download on the command line in CentOS Linux 8

Type the following command in the terminal window to save the OpenVPN groupedServerList.zip file from our repository:

wget https://vpn.ncapi.io/groupedServerList.zip


Unzip the configs files into selected directory by using the following command and pressing Enter:

unzip groupedServerList.zip


After all the required configuration files are downloaded, they will be shown in the terminal window:


After the unzip is complete and the prompt appears, move to the next step.

3. Close the Terminal window, click on the Network icon in the top right of the screen and select Network Settings:


4. On the Network section click the + button and move on to the next step:


5. Click Import from file…


6. Select your preferred TCP or UDP OpenVPN configuration downloaded earlier from your Downloads folder (e.g. NCVPN-AU-Melbourne-TCP.ovpn).

Once the configuration file has been chosen, click the Open button in the top right corner as shown below:


7. The previously selected OpenVPN config file will have been imported into the Add VPN window. Here you will need to configure the following settings:

  • Enter a desired connection name in the Name field
  • Enter the server address in the Gateway field
  • Type: Password
  • User Name: FastVPN Account Username from the FastVPN Aaccount Panel
  • Password: FastVPN Account Password from the FastVPN Account Panel


Click IPv6 in the menu on the left and disable IPv6 (as shown below). After that click the Add button:


8. Once your new OpenVPN configuration is installed, you should see the newly created OpenVPN connection listed in the menu on the left in the Network window. Toggle the VPN connection to the position ON to connect to FastVPN:


9. If the VPN connection is successful, you will get the following message:


To confirm that your IP address has changed to an anonymous and private FastVPN IP, open your web browser and go to https://www.namecheap.com/vpn/what-is-my-ip/
 
16. To disconnect from FastVPN, select VPN Connection and click Turn Off:


If you need any further assistance, please contact our Support Team.
Updated
Viewed
10944 times

Need help? We're always here for you.

notmyip