In today’s guide, we are going to look at how to install OpenVPN client on Manjaro Linux. First, let us answer these common VPN related questions: What is VPN? How does VPN works? What is OpenVPN server/ client?
What does VPN stands for and what is VPN used for? Many organizations have embraced the concept of information security. They have data that has to be kept private and which sits within a local network, also termed as private networks. VPN, Virtual Private Network, enables accessing private networks by remote hosts over the internet. It provides an encrypted link over the insecure network (internet) to exchange information between two private networks, and makes it to appear as if the private networks are directly connected.
There are two types of VPNs that are common with many organizations:
- Site-to-site VPN – A site-to-site Virtual Private Network connects to two or more networks. This mostly applies where an organization has a head office and branches that need to access it.
- Remote access VPN – A virtual Private Connection is created between an office network and a client machine. In this case, a VPN server is configured at the office network while the employee computer is the VPN client. Users will have to install a VPN client and configure it to connect to the VPN server.
How OpenVPN works?
If you are asking yourself what OpenVPN is and how OpenVPN works, we have got you covered. OpenVPN is both an open source VPN protocol and software that uses VPN techniques to secure point-to-point and site-to-site connections. It handles client-server encrypted communications and thus is mostly used by employees remotely accessing their office private network. It is also used between head office networks and branches, where an OpenVPN server sits at the head office while the OpenVPN client is at the branches where users connect to access the head office. An openVPN server carries the configuration and management of the OpenVPN based VPN connection. It also provides OpenVPN profiles (.ovpn) that are configured on the clients in order to establish a secure connection.
Install OpenVPN on Manjaro Linux
To be able to use OpenVPN on a user’s computer, we need to install OpenVPN client. This next session describes how to install OpenVPN client on Manjaro Linux.
Install package networkmanager-openvpn by running the below command.
sudo pacman -S networkmanager-openvpn
Configure OpenVPN client on Manjaro Linux
At this time, you have your .ovpn file saved to your computer. We can configure the client, either using the command line or via Gui.
How to Import OpenVPN config file from command line.
We are going to import the OpenVPN config file from command line with NetworkManager. Run the below command:
$ sudo nmcli connection import type openvpn file /path/to/your.ovpn connection ‘connection-name’ successfully added
Now make connection to the OpenVPN serve by running the command as shown:
$ nmcli connection up <connection-name> Connection successfully activated
To check openvpn connection details, use the command as shown below:
$ nmcli connection show <connection-name>
To see IPv4 OpenVPN client IP and other info, run:
$ nmcli connection show <connection-name> | egrep -i 'IP4'
Test OpenVPN connectivity. Ping to the OpenVPN gateway is successful as shown below:
Import a .ovpn file with Network Manager GUI
Another way to import OpenVPN file is through Manjaro graphical interface. Click on the nework icon then settings to open network settings as shown :
Click on the + sign on VPN section then choose import from file
Click on Add button
Once added, go back to the network icon, click on VPN off then click Connect to start using the OpenVPN connection.
Enjoy! Check more Linux guides below:
Udemy courses to consider: