Before proceeding, please make sure the following requirements are met:
- Linux Ubuntu 13.1 - instructions might also work for older/newer versions, but can slightly differ. In this article, the VPN connection on Ubuntu 18.04 is demonstrated
- Updated software packages
- Installed OpenVPN software
- Installed network manager
- A CyberGhost account
Here's how to create a CyberGhost account online
Here's how to manage your CyberGhost account
- A CyberGhost subscription
How to purchase or upgrade a subscription
Only prepaid subscribers: How to enter an activation key
Disclaimer: Please keep in mind that, although the technical process is as thoroughly documented as possible, you need to have at least some technical understanding. Although we will always try our best to keep these articles updated, there's always a chance for certain things to change since Linux distributions are regularly updated and some menus may get rearranged, packages required may change, etc.
Generate the OpenVPN configuration files by first visiting your CyberGhost VPN online account.
Click on 'My Devices' and then on the 'Add Device' button.
In the list of Operating Systems, please choose 'Other' to allow the setup of all necessary options for the OpenVPN protocol.
Click on 'Create new credentials' and the device slot will be reserved for the new OpenVPN configuration.
Scroll up and you’ll find the newly added “Device’ 'Linux, Router, etc.'. Click on that button:
Type a Name for your new device and activate the desired extra features, provided with each regular 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: Since native protocol connections may only be used with exactly one server at a time, you now have to choose the country you want to surf from; the server to be used in this country will be chosen by CyberGhost automatically. (If you want or need different PPTP, L2TP or OpenVPN connections in different countries, repeat all steps for every country.)
- Server group: Depending on the chosen country as well as the availability of different server types as an attribute of your current plan you can also define a server group to use:
- Standard and Premium Servers: This is the group of all paid service servers of the country chosen.
- NoSpy Server: This is the group of all exclusive NoSpy servers of the country chosen. These servers can only be accessed by those subscribers, who opt for them as an additional feature.
After setting up your connection, it’s advised that you make a note of the following info. You will need them to configure your device:
- Server: This is the address of the country (server) you want to be connected with, e.g. '1-ro.cg-dialup.net'. Note: This address changes with every country you have chosen in the step before. The actual single server to be used will be chosen automatically by CyberGhost.
- Username: A username generated solely for protocol usage. This is NOT your regular CyberGhost account user name.
- Password: A password generated solely for protocol usage. This is NOT your regular CyberGhost account password.
Once done, please download the configuration file by clicking 'Download Configuration' and save the file on your computer. It's a ZIP file, which contains the following single configuration files:
- ca.crt: This is the certificate of the certification authority
- client.crt: This is the user certification file
- client.key: This is your private key file
- openvpn.ovpn: This is your OpenVPN configuration file
Install OpenVPN and the network manager on (you may already have these installed but if unsure, proceed with the following steps).
If Terminal isn’t visible on the Launch bar, click on the ‘Show Applications’ button (in the bottom-left part of the screen) > then type in 'Terminal' in the search field:
In the terminal window enter the following commands and confirm with 'Enter'
You may be required to enter your Ubuntu account password – please do so and although there will be no visual feedback that you’re typing something, you can indeed enter the password and confirm with Enter):
sudo apt-get update
sudo apt-get install openvpn
sudo apt-get install network-manager-openvpn
Note: Depending on your distribution it might happen that the network manager lacks the option to go for an OpenVPN connection. If that's the case, please open a terminal window and enter the following commands:
sudo apt-get install network-manager-openvpn
sudo apt-get install network-manager-openvpn-gnome
sudo apt-get install network-manager-pptp
sudo apt-get install network-manager-vpnc
Log out and log in again, restart your computer or open a terminal and enter the following command:
sudo systemctl restart network-manager
(alternatively, you can use: sudo service network-manager restart)
Note for users of older Ubuntu versions (older than 16.04): you will need to use the ‘sudo restart network-manager’ command. Recent Ubuntu versions have replaced this command with those shown above.
Start the file manager, open your home folder and create a sub-folder called 'CyberGhost'.
Unzip the content of the downloaded ZIP file and copy all of the configuration files inside the 'CyberGhost' folder.
Click on the Network icon in the upper right corner of the screen > click the Settings icon
Under ‘Network’ > VPN section > click the [+] button
Click ‘Import from file’ and go to the CyberGhost folder you’ve created > double-click on the OpenVpn configuration file (with the .ovpn extension) eg: UnitedStates.ovpn (or the default openvpn.ovpn if you haven’t changed its name)
In the Add VPN menu see to the following options:
- Name: Type in a name for this connection, ideally composed out of the country to surf from and maybe the server group to be used, e. g. 'UnitedStates'
- Gateway: The server address is already filled in by the loaded configuration file
- Type: Choose 'Password with certificates (TLS)' (usually already filled in by the loaded configuration file)
- Username: The user name created in Step 1. DO NOT use your regular user name!
- Password: The password created in Step 1. DO NOT use your regular password!
- CA certificate: Enter here the path to the CA certification file ('ca.crt') - usually already filled in by the loaded configuration file
- User certificate: Enter here the path to the user certification file ('client.crt') - usually already filled in by the loaded configuration file
- Private Key: Enter here the path to the key file ('client.key') - usually already filled in by the loaded configuration file
- User key password: Leave empty
Now just click ADD and you'll be able to connect by simply switching the VPN ON from the top-right part of the screen under the VPN entry (see the examples below)
NOTE: You can check your IP with any Online service (like www.iplocation.net ) or by simply Googling "What's my IP".
If you want to surf from multiple countries (a brief overview):
You will have to first rename the unzipped OpenVPN configuration file from 'openvpn.ovpn' to the country you’ve currently chosen e.g. ‘UnitedStates.ovpn' (or whatever location/server group combination you have chosen while setting up the configuration file in your account management).
Back in the Device management menu (where you’ve selected the country for the connection) just choose a different location and a different server group (if available), then download the zipped configuration file. Unzip it anywhere, rename the containing 'openvpn.ovpn' to reflect the new country and copy it inside the CyberGhost folder you’ve previously created.
Note: The re-downloaded certificate and key files in the ZIP do not need to be copied again as they will be the same as the ones you’ve previously downloaded, just copy the .ovpn file.
In essence, to add another country, please take the following steps (after configuring the first connection):
- After creating the first connection, let's say it is to the United States for the sake of this example, go back to the 'My Devices' menu and click on the previously created OpenVPN configuration (the same one)
- Specify the protocol and choose a country, let's use France as the second country
- Download the zipped configuration file by clicking 'Download Configuration' (The Username and Password are the same as the initial setup)
- Unzip the downloaded file and copy just the *.ovpn file into the 'CyberGhost' folder you have previously created
- IF you have not renamed the initial config file, rename the OpenVPN configuration file from the default ‘openvpn.ovpn’ to ‘UnitedStates.ovpn’ (or whatever country you've initially chosen).
- Rename the newly copied file to ‘France.ovpn’.
- Import the France.ovpn as illustrated in Step 2 (just like you did for the initial config)
You can use this method to add as many countries as you wish they’ll appear separately in the Network Manager and you’ll be able to connect to whichever you wish.
The CyberGhost folder now consists of the following files (regarding the example above):
Multiple countries will appear in the network menu as well and you’ll be able to quickly connect to any of them by using the On/Off switch.