If you love good features in compact sizes, it's obvious you'll use your Raspberry Pi computer for performing different online tasks. Hence you must install CyberGhost VPN on this device to secure your online traffic. And, if you're installing this VPN for the first time, you need proper guidance for a clean installation. So, without further ado, learn how to download, install, and use CyberGhost VPN on Raspberry Pi.Â
1. First, click here to visit the CyberGhost VPN subscription page.
2. Next, hit the Get CyberGhost VPN button.
3. Select a suitable subscription plan on the next screen and submit the required details to purchase.
4. You'll receive a confirmation email next.
5. Now, visit CyberGhost official website and click My Account from the top-right corner.
6. Enter your Username and Password on the next screen to Log in.
7. Now, navigate to Routers or other devices and click the Configure button.
8. Fill in the details on the next screen as mentioned below:
9. Hit the Save Configuration button now.Â
10. Manage Devices page will open next, locate Routers or other devices, and hit the View button.
11. Your Raspberry Pi configuration will be previewed now; take a note of Server Group, Username, and Password.
12. Next, hit the Download Configuration button.
13. A .zip file will be downloaded on your system; extract it to find the below entries:
14. Once done, rename the openvpn.ovpn file with 'CG_AnotherCountry.conf' [Replace 'AnotherCountry' with the country code of the location you want to connect to, e.g., 'CG_USA.conf']
15. Now, you've to copy all the files into the OpenVPN directory on your Raspi device. Enter the below command first to move to the folder where you've kept all the unzipped files:
cd [path to configuration folder]
16. Next, copy all the entries existing in this folder:
sudo cp CG_AnotherCountry.conf /etc/openvpn/
sudo cp ca.crt /etc/openvpn/
sudo cp client.crt /etc/openvpn/
sudo cp client.key /etc/openvpn/
17. After that, you need to ensure your system is running the latest version and you've got the right packages. Enter the below command in a console to download the package information.
sudo apt-get update && sudo apt-get upgrade
18. When done, download the required OpenVPN package with the help of the below command.
sudo apt-get install openvpn openssl openresolv
19. Now, move on to the OpenVPN folder by entering the below command.Â
cd /etc/openvpn
20. Next, create a user.text file in the OpenVPN folder to save the username and password that you've received from your CyberGhost online account. Type in the below command for that.Â
sudo nano user.txt
21. Once you create the .text file, type in your Username and Password (from the note you've taken at step 11) in separate lines, as shown below.Â
Username
Password
22. Now, save the changes by pressing CTRL+O and exit by typing CTRL+X.
23. Next, open your configuration file CG_AnyCountry.conf with the following command.
sudo nano CG_AnotherCountry.conf
24. You've to extend the auth-user-pass line now:
[...]
auth-user-pass
[...]
25. Use the path to your credential file to extend this line:
[...]
auth-user-pass /etc/openvpn/user.txt
[...]
26. Now, paste the below two lines right below 'verb 4' in the configuration passage.
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf
27. After that, save the file by pressing CTRL+O and exit via CTRL+X.
28. Now, enter the below command and add the associated line to autoload the file.
sudo nano /etc/default/openvpn
AUTOSTART="CG_AnyCountry"
29. Next, save it with CTRL+O and exit by pressing CTRL+X.
30. Once done, type the below command in your console to enable the OpenVPN connection.
sudo update-rc.d openvpn enable
31. You need to start your OpenVPN connection now, but before that, check your configuration with the following command.Â
cat /etc/resolv.conf
[This step is performed to ensure that your router's IP is shown in the 'nameserver' line. If it's not there, consider changing it.]
32. Finally, start the OpenVPN service using the following command.
sudo service openvpn start
That's all! Everything should work fine, and your VPN connection should get established on the Raspberry Pi by now. If you want to install CyberGhost VPN on other devices also, check our complete setup guide. Thanks for reading!Â