Kali Linux

How to Configure OpenVPN in Kali Linux

OpenVPN is a free and open-source VPN application that allows you to encrypt and send your network data via secure tunnels from one device to another not located on the same network. OpenVPN uses OpenSSL to encrypt network traffic to and from your devices.

Once connected to an OpenVPN server, your network traffic gets routed through the server, keeping your data secure. In turn, this helps protect you from network attacks, especially when connected to public networks.

NOTE: Using a VPN does not always guarantee data privacy. Always store your private information at secure and encrypted locations.

This guide will walk you through installing and setting OpenVPN on Kali Linux to protect your traffic when doing pen-testing.

For this, you will require:

  • A working installation of Kali Linux
  • Internet connection

Installing OpenVPN

The first step is to install the OpenVPN packages using the apt command as:

sudo apt-get update

sudo apt-get install openvpn network-manager

Once you have the packages installed, restart your device to ensure that the changes take effect.

Connecting to a VPN

The next step is to connect to a VPN server. You will need to have an OpenVPN configuration file. You will often find OpenVPN files from your VPN provider in the .ovpn extension.

Once you have your config file, use the command below to connect to the vpn server. You will need the username and password to connect to the server.

$ echo "USERNAME" >> /etc/openvpn/credentials

$ echo "PASSWORD" >> /etc/openvpn/credentials

$ sudo openvpn se-us-01.protonvpn.com.udp.ovpn

Tue Feb  9 18:37:41 2021 OpenVPN 2.4.7 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Feb 20 2019

Tue Feb  9 18:37:41 2021 library versions: OpenSSL 1.1.1d  10 Sep 2019, LZO 2.10

………..

You can also import a VPN configuration file using the GUI interface.

Conclusion

This quick guide has shown you how to install and setup OpenVPN on Kali Linux.

About the author

John Otieno

My name is John and am a fellow geek like you. I am passionate about all things computers from Hardware, Operating systems to Programming. My dream is to share my knowledge with the world and help out fellow geeks. Follow my content by subscribing to LinuxHint mailing list