Please make sure the following requirements are met:
- Linux Debian (instructions might work for different versions, but steps can differ in details)
- Updated software packages
- Installed OpenVPN software
- 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. There's always a chance for an overseen mistake and/or things have changed and the article is not updated yet.
Step 1
1. Visit your CyberGhost VPN online account and login with your CyberGhost Username and Password.
2. Click on section 'VPN' from the left-side menu, scroll down the page and click 'Configure Device'.
3. Each server has a configuration file that you will need to create in order to connect to the VPN server. You can download all the configuration files after creating them.
Choose OpenVPN and your preferred Country and Server Group, as described below.
Also, type in a Device name to assign to your device, then configure the parameters for the new device.
- 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.
- Server group: Choose the server group and the OpenVPN protocol (UDP or TCP) you want to use:
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
Click on 'Download Configuration' (if the automatic download has not started) and download the config file to your Mac. 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.
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 Debian device, please visit How to disable IPv6 for Linux
Step 2
Extract the downloaded configuration file and rename the containing 'openvpn.ovpn' to 'CG_Country.conf'.
Copy the file into your OpenVPN configuration directory. For that you open a terminal window and move to the folder in which you extracted the configuration files by typing:
cd [path to the folder with the extracted configuration files]
Now copy the files:
sudo cp CG_XX.conf /etc/openvpn/
sudo cp ca.cert /etc/openvpn/
sudo cp client.crt /etc/openvpn/
sudo cp client.key /etc/openvpn/
If you want to surf from more than one country, download after the selection of a different country in your account management the next zipped configuration file and rename that one also from 'openvpn.ovpn' to 'CG_AnotherCountry.conf'. For two different countries, you need for example do the following steps:
|
Step 3
Before you can begin configuring your network settings make sure you already installed the needed packages. If they are missing, please do as follows:
Download the package information by opening a console and typing ‘sudo apt-get update’.
Once done download the package with :
sudo apt-get install openvpn openssl openresolv
To be able to log in automatically, save your user name and password in a file called ‘user.txt’ and store it in your OpenVPN folder. For that first move to the OpenVPN folder:
cd /etc/openvpn
Now enter the following command to create and open a text file called 'user':
sudo nano user.txt
Type in your credentials (one in each line). In the first line type in the user name created in step 1, in the second line type in the password, also created in step 1:
YourUsername
YourPassword
DO NOT use your regular CyberGhost user name and password, which you use to login in to the client and your account management! |
Save your changes with ‘CTRL+O’ and leave the editor via ‘CTRL+X’
Next, open the configuration file ‘CG_XX.conf’ by typing
sudo nano CG_XX.conf
Extend the line ‘auth-user-pass’ …
[...]
auth-user-pass
[...]
… with the path to your credentials file:
[...]
auth-user-pass /etc/openvpn/user.txt
[...]
At the bottom of the configuration passage (after 'verb 4') add the following two lines:
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf
Save via ‘CTRL+O’ and leave the editor with ‘CTRL+X’.
Then get the file autoloaded by typing
sudo nano /etc/default/openvpn
and adding the following line:
AUTOSTART="CG_XX" (the name of the file WITHOUT the file extension ‘.conf’)
Again, save with ‘CTRL+O’ and leave the editor with ‘CTRL+X’.
At last type in your console
sudo update-rc.d openvpn enable
Step 4
Before starting OpenVPN check your configuration with …
cat /etc/resolv.conf
… and have a look, if the last line (‘nameserver’) shows the IP of the router. If not, change it.
Now start OpenVPN:
sudo service openvpn start
Wait a few seconds and then test, if everything works fine.
Furthermore, you might want to open the website https://dnsleaktest.com/ and test on leaks. For that choose ‘Standard Test’ or ‘Extended Test’.
*Many thanks to ‘Haudrauf’ for the original tutorial!
Comments
0 comments
Article is closed for comments.