Install and Use OpenVPN Client on Manjaro Linux

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.

Step 1: Install OpenVPN on Manjaro Linux

To be able to use OpenVPN on a user’s computer, we need to install the CLI tools needed to use OpenVPN. Run the following command on your terminal:

sudo pacman -S openvpn

If you are going to manage OpenVPN via the GUI, then you need to install the appropriate plugins. (e.g., using NetworkManager in KDE, GNOME, XFCE). Install package networkmanager-openvpn by running the below command.

$ sudo pacman -S openvpn networkmanager-openvpn
resolving dependencies...
looking for conflicting packages...

Packages (1) networkmanager-openvpn-1.12.0-1

Total Download Size:   0.29 MiB
Total Installed Size:  1.55 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] y

Step 2: Configure OpenVPN client on Manjaro Linux

For this, you’ll need the .ovpn file from your VPN provider. Download the file or copy it and save it to a secure location on your computer. After obtaining the config file, you can configure the client, either using the command line or via Gui.

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/ovpn/file
##i.e
$ sudo nmcli connection import type openvpn file OpenVPN_Server_Gedion.ovpn
Connection 'OpenVPN_Server_Gedion' (6df221e1-65f9-440e-9d8b-c3a5a34e4f1b) successfully added.

Now make connection to the OpenVPN serve by running the command as shown:

nmcli connection up <connection-name>
##i.e
$ sudo nmcli connection up OpenVPN_Server_Gedion
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/3)

To check openvpn connection details, use the command as shown below:

sudo nmcli connection show <connection-name>
##i.e
sudo nmcli connection show OpenVPN_Server_Gedion

Sample output:

To see IPv4 OpenVPN client IP and other info, run:

nmcli connection show <connection-name> | grep -E 'IP4'
##i.e
nmcli connection show OpenVPN_Server_Gedion | grep -E 'IP4'

Output:

Import a .ovpn file with Network Manager GUI

Another way to import OpenVPN file is through Manjaro GUI. Since we installed networkmanager-openvpn plugin, we can manage VPN connections from the GUI. Click on the Nework Icon → Network Settings to open network settings window:

Click on the + Sign then scroll down to Other section then choose Import VPN Connection.

Click on Create button. Then select your VPN configuration file and click Open:

Once added, you can see the VPN connection among the available connections:

To connect, click on the Network Icon the Connect to activate the connection.

Enjoy! Check more Linux guides below:

Join our Linux and open source community. Subscribe to our newsletter for tips, tricks, and collaboration opportunities!

Recent Post

Leave a Comment

Your email address will not be published. Required fields are marked *

Need help, have questions, or just not sure where to start?

At CloudSpinx, our experts are always ready to assist you—whether you're exploring options or looking for hands-on support.

Related Post

This article is created to provide guidance when doing VM Migration from One Proxmox Node to Another. One major need […]

Do you have virtual machines running on a KVM virtualization host and want to move them to a Proxmox VE […]

A configuration management system is meant to ease the process of controlling many servers. With configuration management systems, one can […]

Let's Connect

Unleash the full potential of your business with CloudSpinx. Our expert solutions specialists are standing by to answer your questions and tailor a plan that perfectly aligns with your unique needs.
You will get a response from our solutions specialist within 12 hours
We understand emergencies can be stressful. For immediate assistance, chat with us now

Contact CloudSpinx today!

Download CloudSpinx Profile

Discover the full spectrum of our expertise and services by downloading our detailed Company Profile. Simply enter your first name, last name, and email address.