Articles on: Tutorials

Installing and Configuring OpenVPN on Ubuntu 18.04/20.04

We'll be describing the effective rule set to setup OpenVPN over UDP as well as installing OpenVPN on your Dedicated Server from Tempest Hosting.


Make sure to whitelist your IP over 22/TCP so you do not lose access to the machine.



Whitelisting SSH using an example IP Address


After you've whitelisted yourself over SSH you'll need to whitelist the port that you plan on setting up OpenVPN over typically this is 1194/UDP however this is customizable via OpenVPN's configuration files.



Applying UDP whitelist for OpenVPN


After you've applied these two rules direct yourself to the filter tab on the firewall manager to apply the "OpenVPN UDP Server" filter over the port you've setup OpenVPN for.


Applying OpenVPN UDP Server filter

Now that we have the proper firewall rules setup on the edge for OpenVPN over UDP let's install OpenVPN. You can do this by logging into your server and executing this command "wget https://pastebin.com/raw/j6dH8Fc4 -O openvpn-installer.sh" once you have done this you need to give the file proper permissions to execute "chmod +x openvpn-installer.sh"

Now we have an OpenVPN Installer setup script with the proper permissions we execute it by using the command "./openvpn-installer.sh" which will present you with this screen.


OpenVPN Installation Options

This screen presents you with the options required to setup OpenVPN on your server. First make sure that the IP it has obtained and asking you to use is the IP Address linked to your machine. You can check this through the service portal or by executing "curl ipinfo.io" on your machine. After this you can define several different options for your OpenVPN instance such as the protocol it uses, the port it listens on, as well as the DNS it will assign for your clients to use. Shown is the default options being 1994/udp while using Google's DNS. Once you have completed this allow the script to go through the setup process on it's own.



Installation Completed

Once the installation is completed you may connect to your OpenVPN server using the client file, or even add new clients by executing the script again.

Updated on: 22/03/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!