Before proceeding, please make sure the following requirements are met:
- Linux Ubuntu 19.10 - instructions might also work for older/newer versions, but can slightly differ. In this article, the VPN connection on Ubuntu 19.10 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.
Visit your CyberGhost VPN online account and login with your Premium Username and Password
Click on 'VPN' and in the 'Add a new device' >>>Manual setup section > click 'Configure Device'
In the new window, choose your desired protocol, in our example: OpenVPN and your preferred country and server group, as described below:
- Protocol: OpenVPN
- Server group: Choose the server group and the OpenVPN protocol (UDP or TCP) you want to use
- Country: Since native protocol connections may only be used with exactly one server 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.
UDP allows higher speed than the TCP version but can result in broken downloads in some cases. This is the default setting.
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.
Once the desired parameters are chosen, save them with Save Configuration
To view the OpenVPN credentials that are generated for you on the configuration dashboard, press 'View Configuration'.
Once the new page is opened, your connection credentials are generated for you but make note of the following information:
- Server group: This is the address of the country (server) you want to be connected with, e.g. '12345-1-ca.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.
- User name: A solely for this protocol generated user name. This is NOT your regular CyberGhost account user name, it's used only to authenticate with our servers via Manual Configurations.
- Password (you need to check the "Show Password" option in order to see it): A solely for protocol usage generated password. This is NOT your regular CyberGhost account Password, it's used only to authenticate with our servers via Manual Configurations.
- Pre-Shared Key
Please download the configuration file. For that please click on 'Download Configuration' and download the config file to your computer (it's recommended that you create a special folder for the config) somewhere accessible like your Desktop and Extract/Copy the contents of the .zip file there).
Now, the saved config is a ZIP file, which contains the following single 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
If you need to change the country you connect to, you must re-configure the location to use in your account management and download the new zipped config 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 or just press Ctrl + Alt + T keyboard shortcut to open Terminal
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.
Turn OFF IPv6
At the moment CyberGhost VPN does not support IPv6, therefore sometimes users can experience issues with connection or leaks that are related specifically to IPv6.
To disable IPv6 support on your Ubuntu device, please visit How to disable IPv6 for Linux
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) e.g.: UnitedStates.ovpn (or the default openvpn.ovpn if you haven’t changed its name)
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. 'US OpenVPN'In the Add VPN menu see to the following options:
- Gateway: The server address is already filled in by the loaded configuration file (usually 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 CyberGhost VPN user name!
- Password: The password created in Step 1. DO NOT use your regular CyberGhost VPN 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: Enter here the user key password created in Step 1
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 OFF 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".
It is strongly recommended that you clear your browser's cache and cookies before accessing any IP location online service.
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.
For any additional information or concerns - it is best to approach the Support Department:
via e-mail: firstname.lastname@example.org
via on-line request: https://support.cyberghostvpn.com/hc/en-us/requests/new
via 24/7 Live! Chat Sessions on our website