DEV Community

Chinaza Otumba
Chinaza Otumba

Posted on • Updated on

How to Install VPN on Kali Linux Using OpenVPN and VPNBook

Kali Linux, formerly known as BackTrack, is synonymous with security and forensics. It is a Linux distro; based on Debian and built for cyber security experts, penetration testers, and white-hat hackers for digital forensics and penetration testing.

Having a VPN on your Kali Linux increases invisibility (private mode) while you keep testing for vulnerabilities.

In this article, we’ll show you how to install a VPN using OpenVPN and VPNBook on Kali Linux.

Why do you need a VPN on your Kali Linux?

Despite being built for digital forensics and penetration testing, Kali is just like every other Linux distro or operating system (OS), and as a user, you need to protect your activities while using it.

Failure to do so is like using an umbrella with holes,you'll definitely get soaked when it rains.

Installing a VPN helps cloak your IP address, bypass censorship/geographical limitations, and encrypt your network traffic. Or, in this case, you can view it as patching the umbrella.

Please note that despite doing all the things stated above, you may still need more than a VPN to protect yourself, depending on the task.

Why open-source VPN?

This article will focus on an open-source VPN, as they provide higher transparency compared to closed-source VPNs. Some closed-sourced VPNs even rely on open-source VPNs to function.

The selected VPN for today is OpenVPN because it is compatible with various OSes.

How to Install a VPN on Kali Linux?

Let's assume you already have Kali Linux up and running (either on your virtual machine or you dual boot it on your machine).

  • Next, open your terminal by navigating to your apps menu.

  • Then click the icon or use the command Ctrl + Alt + T.

!
Image description

  • Type the command Sudo apt-get install OpenVPN once the command line opens.
Sudo apt-get install OpenVPN
Enter fullscreen mode Exit fullscreen mode

Image description

  • Depending on your setup, you might be asked to input your password.

  • To confirm a correct installation after the download,, type the command Openvpn into the terminal, “”.

Openvpn
Enter fullscreen mode Exit fullscreen mode

Image description

  • Next, you'll need to get the required configuration files for your VPN to work properly. Open your browser and go to www.vpnhooks.com.

Image description

  • Then scroll down and select OpenVPN from the options available.

Image description

  • Select the server you prefer and download the configuration file.

For the purpose of this guide, we will be using US1 Server.

Image description

  • After downloading the configuration file, extract the files.

Configuring OpenVPN

There are two ways to proceed with the configuration from this point. It’s either through the GUI or the Terminal.

Configuring OpenVPN with GUI (Graphical User Interface)

Using the GUI option is typically easier, but the images provided could be slightly different on your version of Kali.

  • Go to settings and select network. Then click the plus sign(+) at the bottom

Image description

  • From the pop-up, select import saved VPN configuration

Image description

  • Input the username and password found on the VPNBook website and click Save.

  • After this, you're good to go!

Congratulations! You have successfully installed OpenVPN on your Kali Linux using the GUI method.

Configuring OpenVPN from the Terminal

Unlike the GUI method, the terminal stays the same on various Kali versions. Other Linux distros on the other hand would require different commands.

  • For this method, simply right-click on the folder where you have extracted the configuration files

Image description

  • And select open Terminal.

  • Then input the command, Sudo vpnbook-us2-tcp443.ovpn

Sudo vpnbook-us2-tcp443.ovpn
Enter fullscreen mode Exit fullscreen mode

Image description

  • Input the username and password when prompted.

Image description

You've now successfully installed OpenVPN on your Kali Linux using the terminal.

Image description

Conclusion

We have successfully installed a VPN in our Kali through the GUI process and using the terminal.

If you made it to the end, congratulations.

Top comments (1)

Collapse
 
geraldscheffterson profile image
geraldscheffterson

Installing a VPN on Kali Linux using OpenVPN and VPNBook can provide you with an added layer of security and anonymity, much like using the Xnxubd VPN browser APK for secure browsing on mobile devices. First, you'll need to install OpenVPN by running sudo apt-get install openvpn in the terminal. Then, head over to the VPNBook website to download the OpenVPN configuration files. Once downloaded, unzip the files and move them to the OpenVPN directory, usually located at /etc/openvpn. Finally, initiate the VPN connection with the command sudo openvpn --config /etc/openvpn/[your-chosen-config-file]. And there you have it! You've successfully set up a VPN connection on your Kali Linux system.