NordVPN Help Center
One place for all the information you need

Linux setup

Updated

You can connect a Linux system in a variety of ways - choose one below.

Please also note that since Linux has a lot of different distributions, the configuration interfaces may vary.

OpenVPN via terminal
  • 1. Open terminal (keyboard shortcut: Ctrl + Alt + T).
  • 2. Install OpenVPN client by entering:
    sudo apt-get install openvpn
    (if you are requested a password, enter the password which you have used when creating your account).
  • 3. Navigate to OpenVPN configuration directory with command:
    cd /etc/openvpn
  • 4. Download OpenVPN configuration files with command
    sudo wget https://downloads.nordcdn.com/configs/archives/servers/ovpn.zip

    4.1. In case you will get `ERROR: The certificate of `nordvpn.com’ is not trusted.`, please install `ca-certificates` package with command:
    apt-get install ca-certificates
  • 5. If you do not have `unzip` package installed, download it by typing in:
    sudo apt-get install unzip
  • 6. Extract `ovpn.zip` with command:
    sudo unzip ovpn.zip
  • 7. Remove files which will be no longer used:
    sudo rm zip
  • 8. Depending on the connection protocol you want to be using(TCP or UDP), you can do either one of these commands:
    cd ovpn_udp
    or
    cd ovpn_tcp
  • 9.Now, to see the list of all available servers, simply enter the
    ls -al
    command and it will print full configuration file list.
  • 10. Choose a server which you would like to connect to.
  • 11. Start OpenVPN with a chosen configuration by entering:
    sudo openvpn [file name]
    For example:
    sudo openvpn us842.nordvpn.com.udp.ovpn
  • 12. OpenVPN will ask you for credentials, so simply enter those in with your NordVPN account credentials.
  • 13. You have successfully connected to VPN. To disconnect from the OpenVPN connection simply open terminal and press <strong>Ctrl + C</strong> on your keyboard.

Close ↑

OpenVPN via Network Manager (Ubuntu Unity)
  • 1. Open Terminal, Applications -> Accessories -> Terminal

    1.PNG
  • 2. Install network-manager-openvpn by typing in Terminal:
    sudo apt-get install network-manager-openvpn-gnome
    Press Enter (Enter password if it needed). If that doesn’t work, try running these commands first:
    sudo add-apt-repository universe
    sudo apt-get update

    2.PNG
  • 3. You will be prompted: Do you want to continue? [Y/n]. Type Y and hit Enter.
  • 4. Once installation is complete, restart Network Manager by typing:
    sudo service network-manager restart
    Press Enter.
    You might need to restart your computer if the service does not restart this way.
  • 5. Network-manager is now running. Now download the following files:
    OpenVPN Configuration File Package
    Extract them into your selected directory.
  • 6. Click on the double arrow button at the top right of the screen and then select Edit Connections… from the drop-down.


    3.PNG
  • 7. Then press Add.

    4.PNG
  • 8. You will be prompted to choose a connection type. Select Import a saved VPN configuration… and click on Create…

    5.PNG
  • 9. You will be asked to select a file that you would like to import. Please navigate to a folder where you have extracted the configuration files and select one of the files from the list and click Open. You can check what file corresponds which server at our server list.

    6.PNG
  • 10. In the popped window put in your NordVPN Username and NordVPN Password. Then press Save. And close all of the open windows.

    7.PNG
  • 11. Now click on the double arrow button at the top right of the screen again and then select VPN connections from the drop-down. Select the server which you have set up and click on it.

    8.PNG
  • 12. Congrats! You are connected to VPN. In our website you can check if the connection works well for you. Refresh the website and check if the status is shown as Secured.

Close ↑

OpenVPN via Network Manager (openSUSE KDE)
  • 1. Open Konsole

    1.PNG
  • 2. Install OpenVPN by typing in Terminal:
    sudo zypper in openvpn
    Press Enter (Enter password if it needed).

    2.PNG
  • 3. You will be prompted: Do you want to continue? [Y/n]. Type Y and hit Enter.
  • 4. Now download the following files:
    OpenVPN Configuration File Package
    CA and TLS Certificates
    Extract them into your selected directory.
  • 5. Right click on the small computer in the bottom right corner of your screen and press on Configure Network Connections...

    3.PNG
  • 6. New window will pop up. Press Add.

    4.PNG
  • 7. You will be prompted to choose a connection type. Select Import VPN....

    5.PNG
  • 8. You will be asked to select a file that you would like to import. Please navigate to a folder where you have extracted the configuration files and select one of the files from the list and click Open. You can check what file corresponds which server at our server list.

    6.PNG
  • 9. In the new prompted window put in your NordVPN Username and NordVPN Password. Then press OK. And close all of the open windows.
    7.PNG
  • 10. Now click on the small computer in the bottom right corner of your screen and press Connect next to the VPN profile you just created.

    8.PNG
  • 11. Congrats! You are connected to VPN. In the NordVPN website you can check if the connection works well for you. Refresh the website and check if the status is shown as Secured.

    9.PNG

    10.PNG

Close ↑

OpenVPN via Network Manager (CentOS Gnome 2)
  • 1. Open the Terminal

    1.PNG
  • 2. Add the following repository:
    sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
    Press Enter (Enter password if it needed).

    2.PNG
  • 3. Install the following package:
    sudo yum install epel-release
    Press Enter (Enter password if it needed). Enter Y whenever asked if you want to continue.

    3.PNG
  • 4. Install OpenVPN by typing in the Terminal:
    sudo yum install openvpn
    Press Enter (Enter password if it needed). Enter Y whenever asked if you want to continue.

    4.PNG
  • 5. Now please install the OpenVPN support for Network Manager with this command:
    sudo yum install NetworkManager-openvpn-gnome.x86_64
    Press Enter (Enter password if it needed). Enter Y whenever asked if you want to continue.

    5.PNG
  • 6. Restart the Network Manager:
    sudo service NetworkManager restart
    Press Enter (Enter password if it needed).

    6.PNG
  • 7. Now download the following files:
    OpenVPN Configuration File Package
    CA and TLS Certificates
    Extract them into your selected directory.
  • 8. Click on the small arrow in the top right corner of your screen and press on Wired -> Wired Setting.

    7.PNG
  • 9. New window will pop up. Press + and then VPN.

    8.PNG
  • 10. Then press Import from file....

    9.PNG
  • 11. You will be asked to select a file that you would like to import. Please navigate to a folder where you have extracted the configuration files and select one of the files from the list and click Open. You can check what file corresponds which server at our server list.

    10.PNG
  • 12. In the new prompted window put in your NordVPN Username and NordVPN Password. Then press OK. And close all of the open windows.

    11.PNG
  • 13. Now click OFF near your created connection and wait till it changes to ON.

    12.PNG
  • 14. Congrats! You are connected to VPN. In our website you can check if the connection works well for you. Refresh the website and check if the status is shown as Secured.

Close ↑

IKEv2 via terminal
  • 1. First of all, let's install all needed dependencies.

    sudo apt install strongswan strongswan-plugin-eap-mschapv2 strongswan-ikev2 libstrongswan-standard-plugins

  • 2. Now, we need to edit ipsec.secrets​file with your NordVPN username and password.

    sudo vim /etc/ipsec.secrets​

    Change Username with your NordVPN username and your password with your password. Your password has to be warped inside double commas, and NOTICE the spaces after username, after ":" and after EAP.

  • 3. Once again, use preferred text editor to enter /etc/ipsec.conf file. Do not forget root privileges since file is write-protected from anyone except root.

    sudo vim /etc/ipsec.conf

    conn NordVPN
      keyexchange=ikev2
      dpdaction=clear
      dpddelay=300s
      eap_identity="USERNAME"
      leftauth=eap-mschapv2
      left=%defaultroute
      leftsourceip=%config
      right=SERVER
      rightauth=pubkey
      rightsubnet=0.0.0.0/0
      rightid=%any
      type=tunnel
      auto=add 
    							

    Replace file content with this block of text. Do not forget to change USERNAME to your NordVPN username you've entered in /etc/ipsec.secrets file. And change SERVER to prefered NordVPN server.

  • 4. Enter /etc/strongswan.d/charon/constraints.conf file.

    sudo vim /etc/strongswan.d/charon/constraints.conf

    Inside the file change load = yes to load = no.

  • 5. Now we will need to download our NordVPN RSA certificate.

    sudo wget https://downloads.nordvpn.com/certificates/root.der -O /etc/ipsec.d/cacerts/NordVPN.der

  • 6. Now let's restart ipsec in order to reload all configuration files.

    sudo ipsec restart​ If you've made any typos in /etc/ipsec.conf file you'll be notified when service will be trying to start.

  • 7. After it's done, you can connect by launching this command:

    sudo ipsec up NordVPN​

    This command should show the output "connection NordVPN has been established successfully".

  • 8. To disconnect, simply type sudo ipsec down NordVPN.

Close ↑

IKEv2 via Network Manager (Ubuntu)
  • 1. Ubuntu users can download the official package from Ubuntu PPA by using the following command:

    sudo apt install strongswan-nm strongswan-ikev2 libstrongswan-standard-plugins
  • 2. We need to download the NordVPN Certificate - run the following command and it will be saved at your Home directory:

    wget https://downloads.nordvpn.com/certificates/root.pem -O ~/NordVPN.pem
  • 3. Let's restart the Network Manager service by running this command in the terminal:

    sudo service network-manager restart
  • 4. Open your Network Manager (System Settings > Network), choose VPN and click on the "+" button.

    4.png 

  • 5. Choose IPsec/IKEv2 (strongswan)

    5.png 

  • 6. Fill in the required information:

    1. Connection Name: Choose any name for your new connection
    2. Address: NordVPN server address - you can find an address for a server in our server list here: nordvpn.com/servers/
    3. Certificate: import newly downloaded NordVPN certificate, which is located at your home directory
    4. Authentication: choose EAP
    5. Username: your NordVPN username
    6. Password: your NordVPN password
    7. Tick the following checkboxes:

      7.1. Request an inner IP address
      7.2. Enforce UDP encapsuation

    6.png 

  • 7. Click on Save and a new VPN connection will be added into your Network Manager window, click on it to connect and you should see notification about a successful connection.

    7.png 

If you face any issues, please contact our Support team here and gather information about your errors from /var/log/syslog.

Close ↑

L2TP via Network Manager
Please Note: Although technically you can use the L2TP / PPTP protocols, they have serious security flaws. Whenever possible, we recommend choosing OpenVPN or IKEv2/IPSec instead.
  • 1. Open terminal (keyboard shortcut: Ctrl + Alt + T).
  • 2. Install L2TP client by entering `sudo apt-get install l2tp-ipsec-vpn` (if you are requested a password, enter the password which you have used when creating your account).
  • 3. If a window pops up with a request configuring openswan select "No".
  • 4. Afterwards, we would suggest rebooting your computer.
  • 5. Go to the Menu and search for L2TP. Start the L2TP Ipsec VPN Manager.
  • 6. You will need to add a new connection in to the manager.
  • 7. In the Connection name field, enter a name for the new connection, for instance NordVPN. (In this tutorial it is named after the server we will set up the connection-Neatherlands #3)
  • 8. Click "Edit" to edit the L2TP details of this new connection.
  • 9. In the first tab (IPsec) configure the following details:
    Connect automatically: Enabled
    Remote Server: Enter one of the NordVPN servers name (For this tutorial we use NL #3 server as an example).
    Server Identity: Leave this field blank.
    Use pre-shared key for authentication: nordvpn
  • 10. In the L2TP tab do not change anything.
  • 11. In the third PPP tab check "Allow these protocols" and make sure all four boxes are checked.
    User name: Your NordVPN username
    Password: Your NordVPN password
  • 12. Click on IP Settings and in the tab select to Obtain DNS server addresses automatically and click OK.
  • 13. When you return to PPP tab click on Advanced, make sure all the boxes are unchecked and click OK, finish setting up the VPN Connection by clicking OK once again.
  • 14. Close down the VPN connection list.
  • 15. Now click on the Menu at the left corner of the screen, search for L2TP and select L2TP IPsec VPN Applet.
  • 16. At the bottom right corner of the screen there should be a monitor tab, click on it and connect to the server you just set up.
  • 17. You are now connected to NordVPN.
  • BACK TO THE TOP ↑

Close ↑

PPTP via Network Manager
Please Note: Although technically you can use the L2TP / PPTP protocols, they have serious security flaws. Whenever possible, we recommend choosing OpenVPN or IKEv2/IPSec instead.
  • 1. From the desktop click on the Network Manager icon in the top right hand corner, click on VPN Connections and Configure VPN. If you can’t see the Network Manager icon, you can open network manager by clicking on System -> Preferences -> Network Configuration and then click on the VPN tab.
  • 2. When the VPN Connection window is displayed, click on Add to create the new connection.
  • 3. Ensure the connection type is PPTP and click Create.
  • 4. For gateway enter one of the NordVPN servers name . In the Connection name field, enter a name for new connection, for instance NordVPN. Enter your NordVPN username and password.
  • 5. Select both MSCHAP and MSCHAPv2 options. Check the box labeled Use Point to Point encryption (MPPE) and then click OK. Click OK again to save the VPN connection.
  • 6. Now start the VPN connection by clicking on the Network Manager Icon again, select VPN Connections and click on the new connection you have created.
  • 7. The Network Manager icon should now have a little padlock icon on it to indicate that the VPN is now connected.

Close ↑