OpenVPN Installation on Linux OS

This article will help you learn how to install and configure OpenVPN on Linux OS.

To install and configure OpenVPN on your Linux OS device, follow the steps (run all the installation commands as the root user):

  1. Start the terminal (Ctrl+Alt+T) and log in with root rights, while knowing the public IP of the server with which the VPN is installed.
  2. To install and configure the packages required when starting OpenVPN, an appropriate script is used. Give the correct server IP address to the script. To download this script, run the command:
    wget https://raw.githubusercontent.com/angristan/openvpn-install/master/openvpn-install.sh
  3. To make the script executable, run the command:
    chmod +x openvpn-install.sh
  4. To run the script, write the command:
    ./openvpn-install.sh
    Some default settings are optimal, just confirm them. The Public IP is the only thing to be checked and possibly edited. Edit the rest only if you know and understand the desired installation option.
    0
  5. The last step is to enter the client's name. Set a password for security reasons.
  6. After the process is completed, check if incoming connections are being listened to:
    ss -tupln | grep openvpn

     1

  7. Additionally, download the OpenVPN configuration file (client01-tcp.ovpn) from the provided link:  http://server_IP:port/xxxxxxxxxx/, you have received this link via email after activating the service.
    2
    3
  8. You can also find VPN access information in your client area.
    1. In your client area, find the VPN Servers tab.
    2. Click Manage.
      10_en (1)
    3. In the Access section, find the OpenVPN settings.
      10_en (2)
    4. Download access information there.
      10_en (3)
  9. After creating the configuration and specifying the path, download it:
    scp user@vpn-server:/path/to/configuration.ovpn /home/user
  10. To install the OpenVPN client, run the command:
    sudo apt install openvpn
  11. Start the client and specify the path to the configuration downloaded from the server with the following command:
    openvpn --config /path/to/configuration.ovpn
  12. The following line shows that the connection was successful:
    Wed Aug 15 19:00:00 2023 Initialization Sequence Completed
  13. To add or remove clients, as well as remove OpenVPN, run the script again and select the appropriate option.
    ./openvpn-install.sh
    What do you want to do?
    Add a new user

    Revoke existing user

    Remove OpenVPN

    Exit

    Select an option [1-4]:

If you have any questions, you can ask them in the online chat in the lower right corner of the site or by ticketing the Techsupport Department.

To order the Personal VPN and Socks5 Proxy service, please proceed with the order.