"SecurityGladiators via the buttons"

7 Steps on How to Set Up a VPN on Ubuntu

VPN usage has been on the rise ever since the knowledge that governments around the world were running massive surveillance programs became widespread. Some users turned to Ubuntu to cut down on privacy-invading applications and OS (operating systems) features. A few wanted to use a VPN on an already more-private Linux for enhanced protection against hackers and spy groups. But Linux can be hard to work with for even some of the simplest applications. This is why readers should learn what is a VPN and how to set up a VPN on Ubuntu (by some measures, the most common Linux distribution in the world) beforehand.

These steps can more or less be applied to many other Linux distributions as well (with some minor tweaks).

Set up a VPN on Ubuntu

The steps to take to set up a VPN on Ubuntu are given below.

  1. Start Typing “Network” in the Activities Overview
  2. Click on “Network” To Open the Panel
  3. Click the + Button at the Bottom of the List on the Left To Create a New Connection
  4. Select “VPN” From the Interface List
  5. Select the Type of VPN Connection You Have
  6. Fill up the VPN Connection Information, Then Click “Add” When Done
  7. Open the System Menu From the Right Side of the Top Bar, Then Pick “VPN Off” and “Connect”

1. Start Typing “Network” in the Activities Overview

Ubuntu makes getting to the Network Window pretty easy for both new and experienced users. To get started, simply click on the “Activities” button in the top left corner of the screen. That should open a new menu screen. In some versions of Ubuntu, simply hovering the mouse over the Activities button can open the panel as well. Whichever method is used, type “Network” and move to the next step.

Ubuntu uses GNOME as the graphical user interface. GNOME Activities is one of the most important features of GNOME. The activities feature comes in handy when Ubuntu users want to access any installed applications or open minimized applications. The Activities feature offers many other options, such as virtual desktops and a search facility.

2. Click on “Network” To Open the Panel

Once the Linux user starts typing “Network,” the Activities menu should show a Network option near the left side of the screen. In some Ubuntu versions, the user may first have to find the Settings menu from the Activities overview menu and then find the Network option. In other versions, users who are connected to the internet via an Ethernet cable have to click on “Network.” Ubuntu users with a wireless connection will have to click on “Wi-Fi.”

Note:

If none of the options exist, then the user should check if the network cable is actually plugged in. Wi-Fi Ubuntu users should see if the wireless card is working properly.

The Network option that is accessible after opening the panel is a great way for Linux users to get all the network options available in a single place. Linux users can accomplish so much thanks to the way Ubuntu organizes network configuration options via the Network panel.

3. Click the + Button at the Bottom of the List on the Left To Create a New Connection

From the new window there should be a + sign visible near the bottom if the previous two steps have been followed correctly. Once found, click the + sign to create a new connection for VPN protection.

There are many great things about Ubuntu. The Network Manager is one of them. Because of the Network Manager, Ubuntu users can set up network connections of all sorts (including VPNs, virtual connections, ethernet and Wi-Fi) with a couple of clicks. The Network Manager was created to make network connectivity a seamless process. The VPN support that the Network Manager offers in Ubuntu works on a plug-in system. While most vanilla Ubuntu distributions come with the necessary software installed, users may have to install OpenConnect or VPNC or OpenVPN manually.

4. Select “VPN” From the Interface List

The exact items and options Ubuntu (or Linux) users will see on the screen will depend on the version of the operating system. Generally, though, the current page should show a drop-down menu button. Click the drop-down menu button to see a host of options for the type of connection that needs to be set up. Click “VPN.” In some versions, the user may only see VPN as a heading with sub-items showing the type of VPN to be set up. Move on to the next step if that is the case.

5. Select the Type of VPN Connection You Have

In this step, users need to choose which type of VPN connection should be set up. Depending on the version of Ubuntu, the user may have from several options to only two options. The option that the user should pick here will depend on the VPN service subscribed to.

Note:

Most elite VPNs offer manual configuration files for the OpenVPN protocol. So, generally, users should pick OpenVPN as the type of VPN connection to set up. But if the user wants to use another protocol and there is an option available, then obviously that option should be chosen.

After picking the right type of VPN connection, click the button that says “Create.”

Readers whose Linux distribution does not come with the Network Manager or OpenVPN need to install those via the terminal by using commands such as, sudo apt-get install network-manager-openvpn” and “sudo apt-get install network-manager-openvpn-gnome.”

6. Fill up the VPN Connection Information, Then Click “Add” When Done

As soon as the user clicks the “Create” button, a new window should pop up. The window should show several input fields and four or five tabs. Ubuntu should automatically take the user to the VPN tab where the user has to fill in VPN connection information such as gateway, type, username, password and CA certificate. But if Ubuntu doesn’t, just click the “VPN” option beside the General tab at the top of the new window.

This is important:

All the information items required above are usually available on the official website of the VPN service the user has subscribed to. The username and/or password will either be the one that the user created during the registration process or the VPN service will provide that information on the official website as well. And the CA certificate (usually a .crt file) is also available on the official website of the VPN subscribed to. Users only need to download the .crt file and then when the Network Manager needs input for the CA certificate field, the user should use the navigator to find the downloaded file and select the .crt file.

A few VPNs provide multiple options for choosing the Gateway. So if one doesn’t work, the user should refer to the official website for more gateway options. Click the “Add” button or the “Save” button to create a new VPN connection.

Users who like to have more options can click on the “General” tab and use a custom gateway port along with the connection type (TCP or UDP). The advanced tab also has a security tab. Users who want to change options such as the Cipher used and HMAC Authentication can do so via the Security tab.

7. Open the System Menu From the Right Side of the Top Bar, Then Pick “VPN Off” and “Connect”

If the user has not changed the default layout of Ubuntu, the system menu should be available in the top right-hand corner of the screen. Of course, in some Ubuntu editions, the system menu may be like Windows 10, in the bottom section of the screen.

Whatever the location of the system menu is, the user should click the icon for network connection. Once clicked, a submenu should show up with an option labeled as “VPN Off.” Click the “VPN Off” option to see further options such as “Connect” and “VPN Settings”. Click “Connect” to finally connect to a server.

What Is a VPN?

An image featuring a person choosing a VPN while the other one is suggesting a VPN concept

A VPN (Virtual Private Network) is a tool that protects the user’s privacy and personal (often sensitive) information in the online world. Most modern VPNs come in the form of services and apps that establish a private connection to the internet via encryption. VPNs create a secure tunnel through which the user’s data is sent and received. Since no communication can take place outside the encrypted and secured tunnel, hackers and government agencies cannot monitor, record or collect that data. VPNs also hide the user’s actual IP address, which allows for safe usage even on public Wi-Fi networks. Users can change the device’s IP address to any desired country that the VPN has a server in. That helps to unblock content that would otherwise be blocked. All commercial consumer-facing VPNs work on the principle of an on-demand encrypted private tunnel that is created as soon as the user uses the VPN app to connect to a VPN server.

In some circles, the term VPN only means the private network connection and nothing else. So the VPN app becomes a VPN client. The VPN client manages the user’s VPN connections and stabilizes the private connection.

Both meanings are acceptable. The wider usage of the term VPN refers to the entire VPN service: the VPN app/client, the VPN server and the established connection. Almost all major operating systems come with VPN clients that only require a username and password, along with a certificate to work. Elite VPNs, though, have developed dedicated apps for such operating systems to give users more control over how a VPN secures a connection and/or device.

How Long Does It Take To Set up a VPN on Ubuntu?

Users can take anywhere between five to eight minutes to set up a VPN on Ubuntu. But again, a lot will depend on the experience of the user with the Linux operating system, the initial conditions and the hardware/software/network resources available for the process.

For example, if the user has already installed the Linux operating system on a device, then that will reduce the total time to set up a VPN on Linux. Some users prefer to change DNS settings as well before setting up a VPN service, which can increase the time to set up the VPN. If the user only wants to use an OpenVPN connection, then that can save time as well. Using the dedicated app for Ubuntu from a VPN service that has this option also can significantly reduce the time to set up a VPN. The total time consumed will increase if the user has to install OpenVPN.

Note:

There are lots of other factors that can increase or decrease the actual time consumed. Some Ubuntu users do not apply updates to software and the operating system as soon as updates become available. That can increase the time to install a VPN on Linux as the system will have to be updated first. Users who do not know the IP address of the current machine will have to take extra steps to find the IP address and then check with the new IP address to make sure the VPN is working.

What Other Ways Can I Set up a VPN on Ubuntu?

There are many other ways to set up a VPN on Ubuntu. The methods include setting up a VPN by first installing the Linux/Ubuntu Compatible VPN app (check the official website of the VPN subscribed to for more information). Linux users can also do the setup via the OpenVPN GUI that many Linux distributions now support.

The steps users need to take to set up a VPN on Ubuntu via a dedicated app are given below.

  1. Before everything else, check if the VPN service in question is actually offering a dedicated app for Ubuntu. Then go to the official website of the VPN.
  2. Almost all VPNs offer .deb files for dedicated VPN apps on Ubuntu. So sign in from the official website of the VPN subscribed to, go to the Downloads area and then look for a .deb package.
  3. Download the .deb package.
  4. Go to the folder where Ubuntu stores user downloads from web browsers. Once the .deb file downloaded in the previous step is located, double-click the package.
  5. Ubuntu will automatically start the installation process via the default package manager.
  6. After step five is complete, update the package list by using the “apt-get” command in the Terminal. To do that, open the Terminal (the default key combination to open the Terminal in Linux is the Windows key + T) and type “sudo apt-get update.” After that, install the VPN app with the command “sudo apt-get install {vpn app name}.”
Another way to set up a VPN on Ubuntu is via a search.

Below are the steps to set up a VPN on Ubuntu via a search.

  1. Search for the app in the Software Center accessible via the Activities menu.
  2. After finding the right VPN app, simply click the “install” button. And that should install the VPN app on Ubuntu.
  3. Some VPNs offer browser extensions that can conveniently play the role of a complete VPN app. Check to see if such extensions are available for the desired VPN.
A more involved way is to manually set up OpenVPN via the Terminal or via the Ubuntu Network Manager.

To set up OpenVPN via Terminal on Ubuntu, follow the steps given below.

An image featuring OpenVPN
  1. Press the Windows key + T to open up the terminal.
  2. Install OpenVPN by using the command “wget https://git.io/vpn -O openvpn-ubuntu-install.sh.”
  3. Then use the command “chmod -v +x openvpn-ubuntu-install.sh” for proper permissions.
  4. After that, use the command ”sudo ./openvpn-ubuntu-install.sh.”
  5. Use the ping command like “ping -c 4 10.8.0.1.”

For the graphical user interface way, the steps users will need to follow are given below.

  1. Install OpenVPN by using the command “sudo apt-get install openvpn network-manager-openvpn network-manager-openvpn-gnome.”
  2. Then access the network menu by clicking the Wi-Fi or Ethernet icon in the system tray in the top right corner of the screen.
  3. From the context menu, look at the option that says “VPN Connections.” Click that option.
  4. Click on “Configure VPN” after that.
  5. Click “Add” or the + sign.
  6. From the “Choose a Connection Type,” this time, choose “Import a saved VPN configuration.”
  7. Then hit the button that says “Create.”
  8. Go to the official website of the VPN subscribed to and then access the Linux download area. VPNs that support OpenVPN GUI method usually offer a .ovpn or OpenVPN configuration files. Download the OpenVPN configuration files and then unzip the downloaded file.
  9. Import the downloaded OpenVPN configuration file when the OpenVPN GUI method asks for the .ovpn files.
  10. From the new screen, all the necessary information to configure the VPN connection should be filled up. Input the username and/or password if that is required and then click on “Save.”
  11. To connect, simply click the Ethernet or Wi-Fi icon in the system tray again and go to “VPN connection,” after which click on the name of the VPN subscribed to.

What Are the Best VPNs for Ubuntu?

The best VPNs for Ubuntu are given below.

An image featuring the Surfshark logo
  1. (Best Overall): Surfshark has quickly become one of the top VPN services for any purpose and operating system. The service offers great speeds, a dedicated Linux app and a user-centric interface. Unlike some of the elite VPNs in the market, Surfshark offers advanced features like multi-hop, CleanWeb, WireGuard protocol and DNS leak protection on the Linux platform as well. To use the Surfshark app on Linux, users must have a version later than Ubuntu 20.04. With unlimited simultaneous connections per account, one can’t go wrong with Surfshark.
An image featuring the ProtonVPN logo
  1. (Best for Security): ProtonVPN is the best VPN for any operating system if the user wants foolproof security and privacy. ProtonVPN offers fast servers, uses strong encryption and provides a free tier for all platforms. With over 1,700 servers, advanced security tools such as split tunneling, Secure Core, Tor network and an ad-blocker, ProtonVPN has got everything a solid VPN for Ubuntu needs.
An image featuring the Mullvad VPN logo
  1. (Best for Privacy): Mullvad is hands down the best VPN for privacy and anonymity. The service has a true zero logs policy and is a fully featured VPN for Ubuntu. Users have the option of using an open-source GUI as well. Mullvad is based in Sweden, offers advanced security features such as WebRTC protection, DNS leak protection, kill switch, IPv6 protection and port forwarding. Mullvad also supports manual configuration. Perhaps the best feature of Mullvad VPN is that users have tons of anonymous payment methods such as cash, via post and others.

What Are the Benefits of Using a VPN?

There are many benefits of using VPN services, the most important of which are mentioned below.

  • The most popular benefit of VPN on Ubuntu and all operating systems is enhanced privacy. VPN services use technologies such as encryption and VPN server location to hide the user’s real location and safeguard personal data. Almost all applications (mobile and desktop) and websites track user activity and collect personal data. VPNs stop web browsers and such applications from accessing any information about the user’s connection.
  • VPNs also prevent bandwidth throttling. Many times, internet service providers will slow down the internet connection speed of the user as soon as too much data is consumed in a short period. So the user may stream videos from sites like YouTube just fine but face buffering issues on Hulu or Netflix. A VPN will encrypt the user’s data, which will block any spying on part of the ISP to know which activity the user is taking part in.
  • VPNs get rid of data throttling. Internet throttling has two types. The first one was mentioned in the previous point (more specifically, bandwidth throttling). The second kind is data throttling, where ISPs want to restrict users from downloading or uploading too much data in a short period. Many ISPs have unofficial data caps. A VPN can block any attempts at recording what the user downloads and uploads as all of the user’s activity will be linked to a different IP address (that is, the IP address of the VPN server connected to).
  • VPNs can facilitate cheap telephone calls. Depending on the laws of the country and the VPN’s capability, users can significantly reduce long-distance calls. Long-distance calls can get expensive. Employees of a company can use the intranet for communication instead of dial-up networks or remote access servers and simply use the local internet service provider access point.
  • VPNs unlock region-locked sports content. Many websites and apps restrict content for various reasons. The most notorious are sports streaming services, where certain matches are not shown in certain cities, even within a country. Channels such as NBC and others are not available to people living outside the U.S. VPNs can change the user’s location to the U.S. and get rid of any georestrictions. Refer to the Terms of Service document of the streaming service before using a VPN to access content meant for specific regions.
  • VPNs can disable censorship. While VPNs are popular for bypassing geographical restrictions, users can also unlock the local version of the same website. Websites and apps can sometimes change the content available by recording the user’s location. This can lead to the user reading the same kind of stories that may or may not represent the true state of a given region. Some local websites may become completely unavailable if there is a repressive government in charge. With a VPN, the user can simply connect to a server outside the country where the government is blocking access to certain articles and enjoy the internet in the purest form possible.

Is There a Free VPN for Ubuntu?

Yes, there are free VPNs available for Ubuntu and many other Linux distributions. While there is no doubt that premium VPNs offer more advantages and fewer disadvantages, free VPNs do have a place for Linux usage. The case for free VPNs for Ubuntu comes down to Ubuntu users trying to save money or just getting into the VPN market to test products out first before committing.

The best free VPN for Ubuntu is ProtonVPN. ProtonVPN is a great VPN, not just for Ubuntu but for any platform. The service offers unlimited usage for free tier Ubuntu users and has a dedicated app for all Linux distributions. The Linux terminal can be used to get the ProtonVPN CLI service as well.

But even the best free VPN for Ubuntu comes with restrictions. ProtonVPN limits the number of advanced security features that free users have access to. The servers on the free tier of ProtonVPN are generally overloaded with most bearing 90% to 99% of full capacity almost at all times. Another problem with the ProtonVPN free version for Ubuntu is the lack of locations and long connection times. Even after all such restrictions, as far as free VPNs for Ubuntu go, ProtonVPN is the best.

Other not-so-good free VPNs for Ubuntu have even more problems. Problems such as a low number of servers, locations, connection types, protocol options and data transfer. Another great example is TunnelBear. TunnelBear is one of the best free VPNs for Ubuntu after ProtonVPN. The service is based in Canada, uses AES 256-bit encryption, publishes independent audit reports regularly and offers servers in Japan, the U.K. and the U.S. on the free tier. But TunnelBear comes with a massive drawback in the form of data restrictions. Free users can only consume 500 MB worth of data per month. Anyone who spends more than a couple of hours a day on the internet doing nothing but visiting text-heavy websites will consume almost triple that amount. And perhaps that’s what TunnelBear is banking on. Entice users looking for a VPN with a free tier and then force restrictions that push free users to purchase a subscription. The premium TunnelBear subscription packages have no data caps or bandwidth limitations.

While the best free VPNs can compete with premium VPNs in terms of usability, in almost every other area, premium VPNs offer a far higher level of performance.

Another important point to consider here is the GUI. Free VPNs rarely have a GUI app for Ubuntu. That fact also holds true for a lot of premium VPNs as well. Ubuntu VPNs also lack features that the Windows version of the same VPN may offer even via the free tier plan. In such cases, the best free VPN for Ubuntu remains ProtonVPN, as the service has a full GUI and support for more Linux distributions than almost any other VPN service.

Ubuntu users looking to stream content from a free VPN service will also be disappointed because most free VPNs either block streaming or are unable to bypass geo-restrictions. The same goes for torrenting. Even a free VPN as good as ProtonVPN does not allow torrenting on the free tier.

Damien Mather Damien is a cybersecurity professional and online privacy advocate with a bachelor of Computer Science. He has been in the industry for 20+ years and has seen the space evolve far bigger than he ever thought. When he is not buried in his research or going through code, he is probably out Surfing or Camping and enjoying the great outdoors. 
Leave a Comment