For CentOS 7, CentOS Stream 8 and CentOS Stream 9

To use a VPN, you must install the OpenVPN software on your local PC and then configure it. In the Access section of the Cloud Panel, you can download a zip file containing the required configuration files. To install and configure OpenVPN:

Install OpenVPN

Requirements
  • You have administrator rights.

  • You have already created a VPN in the Cloud Panel.

  • You have logged in on your local PC.

Note

OpenVPN is not available in the standard repository. The software is available in the EPEL repository.

  • Open the terminal.

  • To install the EPEL repository, enter the following command:
    [root@localhost ~]# yum install epel-release
    The following message is displayed:
    Is this ok [y/N] :

  • Enter y and press the Enter key.

    The following message will be displayed:
    Importing GPG key 0x1D997668:
     Userid     : "CentOS Extras SIG (https://wiki.centos.org/SpecialInterestGroup) <security@centos.org>"
     Fingerprint: 363F C097 2F64 B699 AED3 968E 1FF6 A217 1D99 7668
     From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512
    Is this ok [y/N]:

  • Type y and press Enter.

    The EPEL repository will be installed.

  • To install OpenVPN, enter the following command:
    [root@localhost ~]# yum install openvpn 
    The following message is displayed: Install  2 Packages
     
    Total download size: 714 k
    Installed size: 1.9 M
    Is this ok [y/N]: y

  • Enter y and press Enter.

    The following message will be displayed: Importing GPG key 0x3228467C:
     Userid     : "Fedora (epel9) <epel@fedoraproject.org>"
     Fingerprint: FF8A D134 4597 106E CE81 3B91 8A38 72BF 3228 467C
     From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-9
    Is this ok [y/N] :

  • Enter y.

    OpenVPN will be installed.

Configure OpenVPN

Requirement

You are in the Cloud Panel.

  • Click on Network > VPN.

  • Activate the desired VPN.

  • To download the configuration file, click Download in the Access section.

  • Save the zip file.

Note

This zip file contains the configuration file.

  • Unpack the zip file in the desired folder.

  • Copy the OpenVPN configuration file (e. g. vpn12BC7_1.ovpn) into the installation directory.

Note

OpenVPN is installed by default in the directory /etc/openvpn.

  • To start OpenVPN, enter the following command:
    [root@localhost ~]# openvpn /etc/openvpn/.ovpn
    Example:
    [root@localhost ~]# openvpn /etc/openvpn/vpn45BC7_1.ovpn