Configure OpenVPN for Linux
Posted by Uli Brügmann on 25 February 2013 11:53 AM
On Linux, CyberGhost VPN can be used with a native OpenVPN installation, if the following requirements are met: OpenVPN preinstalled on your distribution, you have a Premium or Premium Plus CyberGhost subscription, an online CyberGhost account and a OpenVPN configuration file, which will be created for you in your account.
Visit your CyberGhost VPN online account.
Log-in with your user data and click in the left sided menu on the entry 'Smart Phones, Tablets & Other Devices'.
Now click on 'Other Devices'.
Right beneath, select the OpenVPN protocol as the one you want to use.
Once done select the country you want to surf from, e.g. 'USA', and the operating system you want your OpenVPN configuration for. In this case it's 'Linux'.
Note: An OpenVPN connection can just be configured with exactly one country (the server inside this country will be chosen automatically by CyberGhost as the most convenient server available).
Now note the following data shown beneath the drop down lists. You will need this data to configure your OpenVPN connection:
The next step is to download the configuration file. For that please click on 'Download Configuration'.
There are several OpenVPN software packages for different Linux platforms like RedHat, Fedora, CentOS and Ubuntu. If your Linux distribution has no OpenVPN built in and does not provide you with the appropriate package, you'll find various setup files or packages for a manual install on the OpenVPN project Website.
Note: As we all know there are seldom two Linux distribution built the same way; therefore the following instructions might be of no help for you. If that's the case, please consult the help documentation of your distribution. Furthermore the following links might also help you out:
Don't forget: You will also need to install the 'network-manager-openvpn' using Synaptic, which will help you adding and managing your various VPN connections. You may also be in need to install more and different software and consider dependencies, e.g. OpenSSL, so an open documantation on the side might come in handy.
To install OpenVPN for example with Linux Mint, open a terminal fand enter the following commands:
sudo apt-get install openvpn
Alternatively consult the respective repository of your distribution and search for OpenVPN.
If you use a RPM based distribution, go to goo.gl/MI3ndm, download the latest Tarball and type this command in a terminal:
rpmbuild -tb openvpn-2.3.2.tar.gz (or whichever version you downloaded)
Now decompress the downloaded CyberGhost configuration file and copy it into a subfolder inside the OpenVPN 'config' folder. Call it whatever you like, 'CyberGhost' for example.
Now use the network manager to configure your new connection - but before that, please open the downloaded 'CyberGhost.ovpn' file with a text editor, extract the following passages and copy the respective content into three new different files:
Following is an example of how to configure OpenVPN with Debian 7: First, click on the network manager in the menu bar. Choose 'VPN connections > Configure VPN'.
In the tab ‘VPN’ click on 'Add'.
Choose 'OpenVPN' as the 'Connection type' and click on 'Create'.
In the next window type in a 'Connection Name', enter the server address you noted before in the field 'Gateway' and take care of the section 'Authentication'.
Now click on 'Advanced' on the right bottom of the window and check all of these options (and uncheck the rest), resp. change settings:
Back in the network manager you now should have an entry with your new OpenVPN connection.
Choose the entry via your menu ('VPN connections > Connection Name') and you're in:
On some systems things don't work out like they should, mostly because of the network manager. If that's the case with your configuration, please try the following:
Completely without network manager, therefore with OpenVPN directly, is another alternative to get stubborn configurations to work:
Note: For each country, you want to surf from, you need to download its own OVPN file from your account management and rename it before copying it to the mentioned folder. That means you have to go through these steps: