How to Set Up An OpenVPN VPN on Linux (Ubuntu)

A step-by-step guide to setting up OpenVPN in Ubuntu

What Are VPNs, And Why Should You Use One?

A VPN is a Virtual Private Network. It is a special type of connection method that is used to secure online connections and add layers of privacy and security to both public and private networks, like WiFi hotspots and personal Internet access points.

A VPN is an important option to consider if you are dealing with sensitive data, like credit card and bank information, or want to secure your connection as a means of protecting your privacy.

There are plenty of legitimate concerns about internet security that are relevant to this day and age – not that security isn’t ever relevant on the internet.

More and more information – personal and otherwise – about our lives, habits, identities, and connections to others are exposed to the internet. Sometimes, this is out of necessity. Other times, it is out of fun, convenience, amusement, or a desire to explore the digital world and reap the benefits it has to offer.

Then there is the factor of greed. More and more companies are employing various tricks and methods to obtain your information, like web browsing habits, pictures, hobbies, search history, friends and contacts, preferred brands and companies, and all other manner of personal information.

Once these companies obtain said information, they then sell it to other companies, who see a perceived benefit into peeking into the online lives of potential customers in an attempt to gauge possible spending preferences.

Needless to say, if you are opposed to this ethically-dubious attempt to turn a profit, then using a VPN every time you connect to the internet is vital to keeping your personal information safe and secure – be it from malicious actors or greedy companies and corporations.

How To Setup A VPN Using OpenVPN in Ubuntu

Now that we’ve covered what a VPN is and why you should consider using one, let’s now discuss the process of setting one up. More specifically, we’re going to be covering a step-by-step guide to setting up OpenVPN in Ubuntu, a variation of Linux.

Why Ubuntu? We chose Ubuntu for this task because it is an extremely secure operating system to use – in fact Linux itself is secure by default, being built specifically with security in mind.

In addition to its security, it’s also designed to be ultra-light on system resources. This offers it greatly increased speed and performance over traditional operating systems like Windows and Mac.

But wait, Why OpenVPN? Aren’t there a million other options out there? Well, OpenVPN has several benefits and features that you won’t find with most other VPNs. These features include:

But there’s more. OpenVPN offers a unique management service that can allow it’s user remote control over the system. This allows for OpenVPN to service remote servers and access sites, which can increase security by increasing the amount of network tunneling that the connection is sent through, and, of course, allows remote server locations to be protected by a VPN connection.

OpenVPN offers its users military-grade security that is designed to protect its users against most forms of conventional cyber attacks. For those worried about the more ingenious cybercriminal, OpenVPN has a highly modular design that allows you to customize its cryptographic and tunneling protocols through an open-source SSL library.

Needless to say, OpenVPN is one of the most versatile and reliable VPNs out there. If you want a full review of OpenVPN, as well as a list of other alternative VPNs, then check out vpnAlert. It’s an informative and authoritative website on all things VPN-related.

Installing OpenVPN On Ubuntu Via CLI (Command Line Interface)

Ok. Without further ado, let’s get into the meat and potatoes here. First, in Ubuntu, open a Terminal console window. Next, we’re going to run a command to give you Superuser permissions:

sudo su

After this, we’re going to download the necessary components to set up OpenVPN. Type this command into terminal and press Enter:

apt-get install openvpn unzip

After this, you will need to download the configuration files for OpenVPN. To do this, you will need to create an OpenVPN account on www.ovpn.com. Once you have done so, the necessary configuration files will appear here.

After this, you will then need to input your login credentials into OpenVPN via Terminal. Enter these commands:

echo "username" >> /etc/openvpn/credentials

echo "CHANGE TO YOUR PASSWORD" >> /etc/openvpn/credentials

Next, start OpenVPN using Terminal and verify that everything is in working order:

openvpn --config /etc/openvpn/ovpn.conf --daemon

Once everything is in working order, you will then want to run a short connection test to verify that you’re able to connect to the OpenVPN server. Wait about 30 seconds, then run this command:

curl https://www.ovpn.com/v1/api/client/ptr

A successful connection should display the following results:

{“status”:true,”ip”:”the external ip”,”ptr”:”PTR for the IP address”}

If all of the above steps went smoothly, you have now successfully installed OpenVPN and will automatically connect on network reboots.

If you’ve had any trouble at any of the steps above, then please send the log file (/tmp/openvpn.log) to OpenVPN’s support team for further instruction.

Or get RSS feed

This entry was posted on Sunday, September 15th, 2019 at 1:35 am. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.