How to configure OpenVPN for Kodi on a Linux device

By May 5, 2017General, Kodi

If you use a Kodi Media Center based on a Linux distribution other than OpenELEC/LibreELEC, OSMC etc. you need to install OpenVPN first and make sure the command ‘killall’ is available. Usually you do this by the following commands:

  • sudo apt-get update
  • sudo apt-get install openvpn
  • sudo apt-get install psmisc

You might have a different Linux installation running, with different steps to take, but they should at least be similar. Below you will find an example of how to install OpenVPN for Linux Mint, others can be seen here in the ‘CyberGhost for Linux’ section.

Important note: Please make sure that you run an IPv4 Internet connection. Some Internet Service Providers already connect with the IPv6 protocol, which is not supported by CyberGhost. While the CyberGhost client takes care of deactivating IPv6 under Windows, users of native protocols have to do this manually (here an instruction on how to deactivate IPv6 under Linux). If IPv6 is not deactivated, data might leak outside the IPv4 VPN tunnel!

Step 1

Visit your CyberGhost VPN online account.

Click on the menu entry ‘My Devices’ and then on ‘Add Device’.

In the list of Operating Systems you can use CyberGhost with, please click on ‘Other’ to be able to setup all necessary options for the OpenVPN protocol. When done, the screen extends and gives way to ‘Create new credentials’. Do it by clicking on the respective button.

Scroll up the page. As you see, the placeholder for a new device is now replaced by ‘Linux, Router, etc.’. Click on that button:

Type a name for your new device and activate the wanted extra features, provided with each Premium subscription:

Scroll down and generate the login and configuration data for the OpenVPN protocol:

  • Protocol: Choose the OpenVPN protocol you want to use:
    • OpenVPN (UDP): UDP allows higher speed than the TCP version, but can result in broken downloads in some cases. This is the default setting.
    • OpenVPN (TCP): TCP allows more stable connections than the UDP version, but is a bit slower. Choose this version, if you have recurrent connection issues such as sudden disconnections.
  • Country: The country you select here is of no importance because the VPN Manager for Kodi will do this job later on. For now it’s just for the proper generation of the configuration file.
  • Server group: The group you select here is also of no importance for the VPN Manager for Kodi but is crucial for the proper generation of the configuration file.

After setting up your connection preferences, note down the following data sets (you will need them in order to configure your device):

  • User name: This is solely generated for protocol usage. This is NOT your regular CyberGhost account user name.
  • Password: A password solely generated for protocol usage. This is NOT your regular CyberGhost account password.

Once done, please download the configuration file. For that please click on ‘Download Configuration’ and save the file on your computer. It’s a ZIP file, which contains the following single configuration files:

  • client.crt: This is the user certification file 
  • client.key: This is your private key file
  • openvpn.ovpn: This is your OpenVPN configuration file
  • ca.crt: This is the certificate of the certification authority

Step 2

Install OpenVPN and the network manager on Linux Mint.

For that click on ‘Menu > All Applications > Software Manager’ and type in the search field (in the upper right corner) ‘openVPN’. Install the following programs with a double click:

  • openvpn
  • network-manager-openvpn gnome
  • network-manager-openvpn

To make sure that already installed components are up to date, open a terminal and enter the following commands:

sudo apt-get install openvpn
sudo apt-get install openvpn bridge-utils
sudo apt-get install network-manager-openvpn network-manager-openvpn-gnome
sudo apt-get install psmisc

Log out and in again or restart your computer or open a terminal and type in the following command:

sudo restart network-manager 

Step 3: Get VPN Manager for OpenVPN and copy files

Download the complete repository for the Kodi VPN Manager (so the VPN Manager will be updated properly, if a new version is published) and leave it unzipped, while the zipped configuration file should be unzipped to an external drive or a folder accessible from within Kodi.

Step 4: Install VPN Manager for OpenVPN

Start Kodi, move to the add-on section and click on ‘Install from zip file’. Select the path to the folder where you copied the repository, mark it and click ‘OK’.

After the repository gets installed, click on ‘Install from repository’, choose the ‘Zomboided Add-on Repository’, click on ‘Services’, then on ‘VPN Manager for OpenVPN’ and lastly, click ‘Install’.

Step 5: Configure VPN Manager for OpenVPN

After the installation move to ‘My add-ons’ and open the entry called ‘Services’:

Open ‘VPN Manager for OpenVPN’ and click on ‘Configure’. You can use the Wizard or do it manually, like we do it here (although the steps are the same). In the tab ‘VPN Configuration’ choose ‘CyberGhost’ as the ‘VPN Provider’ and enter the user name and the password you noted in step 1. DO NOT use your regular CyberGhost credentials.

Click ‘OK’ and select the connection profile, which fits your subscription: ‘Premium and Premium Plus Account’ or ‘Promo Account’:

For the next step we will need the unzipped files from the configuration file you saved somewhere on your device.

Click on ‘OK’ and then select the user certificate (‘client.crt’) and the user key (‘client.key’). Once done, the VPN Manager will connect to your first VPN. If not, click on the ‘VPN connection’ tab and start your ‘first connection’ (which is highlighted).

Comments

comments

Leave a Reply