How to Install VPN on Kali Linux Using OpenVPN and VPNBook
Published: 2022-09-22 16:23:40

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](https://www.makeuseof.com/tag/open-source-vpns-linux-windows/) 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](https://www.makeuseof.com/what-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](https://www.makeuseof.com/install-kali-linux-in-vmware/) 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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/839cwmrkj965kzxe6rcv.png)

* Type the command **Sudo apt-get install OpenVPN** once the command line opens.
    

```plaintext
Sudo apt-get install OpenVPN
```

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/swq8d3midqer6w1pjd8n.png)

* 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, “”.
    

```plaintext
Openvpn
```

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7e6e51a9xl8dsleyj0j3.png)

* 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](http://www.vpnhooks.com).
    


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b0zjfqmgtzrrjwt5fgue.png)


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


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lv1ou1jh58jn7flk74u7.png)



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

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


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q6l3it38tmlu94c41065.png)



* 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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/es6io1ug41za9dnh8up8.png)



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


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/40qub9us84qsjyi8gsth.png)



* 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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ocmpubsryex4b7rd48e2.png)



* And select open Terminal.
    
* Then input the command, Sudo vpnbook-us2-tcp443.ovpn
    

```plaintext
Sudo vpnbook-us2-tcp443.ovpn
```


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h5q9ree3wkuaaorhhczs.png)



* Input the username and password when prompted.
    


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9p9l8xn04vrlvu5nx13e.png)


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


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9qnxbbiv037s3cj0q6oy.png)




###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.