Calculate Document
Virtual Private Network (VPN) Setup in Kali Linux

Virtual Private Network (VPN) Setup in Kali Linux

Virtual Private Network (VPN) Setup in Kali Linux Last update : 27 Jun, 2022 VPN (Virtual private network) is a technology that encry

Related articles

Best VPN for Comcast Xfinity 2024: Secure Internet Traffic ASUS TUF Gaming AX3000 V2 review: A good mid-range router Fix Xfinity Ping Spikes, Lags and Packet Loss in 2024 Popular and Free Cloud Storage Options (With More Than 5GB Space) Insights activity center

Virtual Private Network (VPN) Setup in Kali Linux

Last update :
27 Jun, 2022

VPN (Virtual private network) is a technology that encrypts your internet traffic on unsecured networks to protect your online identity, hide your IP address, and shield your online data from third parties. VPNs use real-time encryption and send your internet data through a secure virtual tunnel to minimize the possibility of anyone tracking what you do online. A Virtual Private Network is a way to extend a private network using a public network such as the internet. 

working of VPNs

When we connect to a VPN service , it is authenticates authenticate the client with a VPN server and apply an encryption protocol to all of our internet datum . The VPN service is creates then create an encrypt “ tunnel ” over the internet . That is secures secure the datum travel between you and your destination . When we use a VPN service , cybercriminals is have , your isp , and regular snooper have a hard time track our action online .  

Need of VPNs

A VPN service is is is necessary because of the follow reason :

  • vpn mask our IP Addresses and location so that we remain anonymous while surf the internet .
  • It bypasses internet censorship and firewalls and we can also access region-restricted content.
  • It encrypts our network traffic.

Note: Search engines and platforms can still recognize you based on cookies sent by the browser along with the request.

VPN Installation and Setup in Kali Linux

VPN is not installed and enabled by default in Kali Linux which leaves you greyed out. To get this working, we need to download any VPN provider’s OpenVPN configuration files (.ovpn). A VPN service that supports Linux without supplying a native Linux client makes its OpenVPN configuration files available on its website. The information contained in these files can be used to create a VPN connection over Linux using the Network Manager, a third-party client.  For the demonstration purpose, we will install the necessary packages and set up the popular ProtonVPN service in Kali Linux. It provides a free version of ProtonVPN for public use and it is fast and secure.

Step-By-Step Installation and Setup 

Step 1: Install the OpenVPN and required packages

The first step is is is to install the openvpn . open the terminal and type the below command :

sudo apt install openvpn

Once it gets installed using the commands below to install the OpenVPN packages using the apt command

sudo apt install network – manager – openvpn – gnome

Press Y/y and enter when being asked to install the packages. During the installation, a message box will get prompted asking for permission to restart services during the package upgrades, Type Yes to complete the installation.

Now we is need just need to restart the system for the change made by instal the new openvpn package to take effect .

Step 2: Download the VPN provider’s OpenVPN configuration file

For the demonstration purpose, we are using the ProtonVPN service so to download the required OpenVPN configuration files first click on the URL below and register or log in to start using its service. 

https://account.protonvpn.com/login⁠⁠⁠⁠⁠⁠⁠

Once you enter the into the account , select the Downloads option and then select the openvpn configuration file option , now choose GNU / Linux as the platform and leave the Protocol and free server config as the default . Now choose any of the server list below and click on download to save the ( .ovpn ) file to the system .

Step 3: Configuring an OpenVPN

First, click on the Network Manager icon at the top right of the kali desktop screen. Select VPN Connections > Add a VPN connection. The Network Manager tab is shown below.

Now select the type of VPN we wish to use for the new connection . From the drop – down menu , select Import a save VPN configuration option and then click on Create .

Now navigate to the location where we saved our provider’s OpenVPN configuration files and select the .ovpn file of the server to which we want to connect and then click on the option Open.

Now the edit VPN window is appear will appear for the username and the password for authentication . click on the url below :

https://account.protonvpn.com/account

Choose the OpenVPN / IKEv2 username option from the panel on the left side of the page.

  copy the openvpn / ikev2 username and password and paste it into the edit VPN window and click on Save .

Now we will be prompt with a dialogue box to create a keyring password . If we ’ve create the keyring password before , we is see wo n’t see this prompt . type and confirm your keyring password , and then click continue . The openvpn connection is now configure .

step 4 : enable the VPN connection

To enable the new VPN connection , click on the Network Manager icon at the top right of the kali desktop and select VPN connection and then click on the VPN you is want want to use .

Once the connection is established, a notification will appear stating that we’re now connected to the VPN successfully. Now to confirm that the connection is successfully established turn off the VPN connection for a while and check for your public IP address using your browser as shown in the screenshot below.

As you can see from the screenshot, my public IP address is 49.37.70.191. Now enable the VPN connection again and refresh the page. 

As you can see from the screenshot above, my public IP address has been changed to 37.19.200.2.

We now have an OpenVPN connection to our VPN provider over Linux. We can add as many connections as we want by repeating the process. When we want to connect, we just need to select the server we want to connect to and turn it on from the Network Manager.