Wait! We Have a Special Deal!

Get CactusVPN for $3.5/mo!

Save 64% Now
30-Day Money-Back Guarantee
Setup Tutorials

How to set up OpenVPN 3 Linux

In this tutorial we will show you how to set up OpenVPN 3 Linux, but first let’s see what are our requirements.

Requirements

In order to set up the OpenVPN you will need:

  1. A CactusVPN account. If you don’t have one you can try our services for free.
  2. Your VPN username and password. You can find them in your account on our website, by going to Settings.
  3. The OpenVPN config files. You can download them on our Downloads page.
  4. The OpenVPN 3 Linux client. You can download and install it from here.

Set up OpenVPN 3

  1. Open the terminal by hitting CTRL + ALT + T

    To become a root user, run:

    sudo su 

    and input your password.

  2. Ensure that your apt supports the https transport:

    apt install apt-transport-https -y
  3. Install the OpenVPN repository key used by the OpenVPN 3 Linux packages:

    wget https://swupdate.openvpn.net/repos/openvpn-repo-pkg-key.pub
    apt-key add openvpn-repo-pkg-key.pub
  4. Now you need to install the proper repository. Replace $DISTRO with the release name depending on your Debian/Ubuntu distribution.

    In my case it is “focal”:

    wget -O /etc/apt/sources.list.d/openvpn3.list https://swupdate.openvpn.net/community/openvpn3/repos/openvpn3-$DISTRO.list

    then run:

    apt update
  5. Install the OpenVPN 3 package:

    apt install openvpn3 -y
  6. Download the OpenVPN configuration files:

    wget -O /etc/openvpn3/CactusVPN-OpenVPN-Config.zip https://billing.cactusvpn.com/downloads/openvpn-configs/CactusVPN-OpenVPN-Config.zip
  7. Unzip the OpenVPN configuration files:

    unzip /etc/openvpn3/CactusVPN-OpenVPN-Config.zip
  8. Go to /etc/resolv.conf by running:

    nano /etc/resolv.conf 

    and add this line:

    nameserver 8.8.8.8 

    at the top.

  9. Hit CTRL + o to save the changes and CTRL + x to exit the file.

Connect to VPN

  1. To connect to a VPN server, we need to know the name of its corresponding configuration file. For example, Nuremberg TCP configuration file name is DE-Nuremberg-CactusVPN-TCP.ovpn.

    To connect to Nuremberg TCP, run:

    openvpn3 session-start --config DE-Nuremberg-CactusVPN-TCP.ovpn
  2. Type the VPN username and password.


    You can find them in your account on our website, by going to Settings. Make sure you use your VPN username and password and NOT the client area credentials (What is the difference?).


    After providing the correct credentials you will get the Connected message.

    To check if your IP address was changed, run:

    curl ifconfig.so
  3. To display any active VPN connection, run:

    openvpn3 sessions-list
  4. To close the Nuremberg TCP VPN connection run:

    openvpn3 session-manage --config DE-Nuremberg-CactusVPN-TCP.ovpn --disconnect

VPN and Smart DNS Services

Protect online privacy, secure your connection and access blocked websites

Try CactusVPN For Free