No matter what kind of device you use, installing OpenVPN is by no means an easy task. You have to go through several complicated procedures and steps to install it successfully on your device. And if you use Linux systems like Ubuntu or CentOS, things can become extra hard for you.
What you need is a simple, step-by-step installation guide so you can install OpenVPN on your device without any issues.
And we are here to provide you with just that. In this article, you will learn how to install OpenVPN on Ubuntu, Windows, CentOS, and macOS devices.
How to install OpenVPN on an Ubuntu Linux system
Installing OpenVPN on an Ubuntu Linux system is not an easy job and it requires you to take multiple precise steps. But first, you need to figure out the public IP address of your server. It will help you perform multiple checkups during setting up OpenVPN after installing it on the Ubuntu device.
To do that, you must open the Terminal in your Ubuntu Linux device and run any one of the following commands to find your IP address.
wget -q0- icanhazip.com
dig +short myip.opendns.com @resolver1.opendns.com
If you have a user interface on your machine, you can also simply Google the term “what is my IP address”. It will display the IP address of your device.
Based on the permissions, you may have to add “sudo” in front of the commands.
After you find the IP address, follow these steps to install OpenVPN:
First, you must download the installer script and make it executable. To do it, run the following commands in the exact sequence:
curl -O https://raw.githubusercontent.com/angristan/openvpn-install/master/openvpn-install.sh
Then make it executable:
chmod +x openvpn-install.sh
Now, you must run the executable installer script using this command line:
sudo bash openvpn-install.sh
If you’re running this command line for the first time on your device, the Ubuntu system will shoot you a few questions. Read those questions and answer them carefully. What you answer the questions with should depend on your preference.
After that, the installation process should be over.
To ensure the OpenVPN is working well and has been installed without any errors, run this command line:
sudo systemctl status openvpn
Once you confirm that it has been installed successfully, you can now proceed to set up OpenVPN and continue to set up OpenVPN clients in Ubuntu Linux.
Installing OpenVPN on a Windows device
Follow these steps to download and install OpenVPN on Windows 11/10 devices:
- First, open your browser and go to the Community download page of OpenVPN.
- Now, if your device has 32-bit system architecture, click on the “Windows 32-bit MSI Installer” option. If you have a 64-bit system, click on the “Windows 64-bit MSI Installer” option.
- Once the downloading process is complete, double-click on the downloaded file to run the OpenVPN installer.
- After the “OpenVPN Set Up” page opens, click on the “Install Now” button.
- Now, you will see a window asking for permissions. Here, click on the “Yes” option.
- Next, the installation process will start. Once it’s complete, you will be able to see the “OpenVPN GUI” shortcut on your computer’s home screen.
- Finally, you see an OpenVPN pop-up saying “No readable connection profiles found,” click on the “OK” button.
With this, the installation process of OpenVPN in your Windows 11/10 device would be finished. You can also download the OpenVPN config file for further configuration.
Steps to install OpenVPN on CentOS computers
Here are the steps you need to follow to install OpenVPN on CentOS 7/8 devices:
First, you need to enable the “EPEL Repository” and install the package to install OpenVPN on your CentOS device. To do it, run the following commands on the CentOS Terminal:
yum install epel-release
Now, it’s time to download the OpenVPN installation script. However, before that, you need to find out the public IP address of the device to ensure a smooth set-up process later on.
To find the IP address, run any one of the following commands:
dig +short myip.opendns.com @resolver1.opendns.com
After you have confirmed the IP address, download the OpenVPN installation script using the following command line:
Once the downloading process is complete, you have to execute the script by running the following series of shell command lines:
sudo chmod +x openvpn-install.sh
After that, the installer will make you go through a series of questions and answers, which you need to answer according to your device and preferences.
In this step, select the default DNS resolvers and type “n” for “compression settings” and “encryption settings.”
After that, the downloaded script will install all the relevant dependencies and software packages.
Finally, to check if OpenVPN has been successfully installed and running without a problem, run the following sequence of command lines:
sudo systemctl start [email protected]
sudo systemctl status [email protected]
How to install OpenVPN Client Connect on Mac
To install OpenVPN Client Connect on a macOS device, follow these steps:
- Open your browser and go to the web interface of the OpenVPN Access Server.
- Now, use your available credentials to sign in and click on the “Mac” icon to start downloading the package.
- After the download is complete, click on the “OpenVPN Connect Installer” to start the installation process.
- Once the installer window shows up, click on the “Continue” button. Then, read the “Software License Agreement” before clicking on the “Continue” button once again.
- Next, click on the “Agree” button when a new pop-up about agreeing to the licensing terms shows up.
- After that, click on the “Install” button.
- Now, macOS will ask for your device’s username and password before continuing the installation process. Enter the right credentials and click on the “Install Software” button.
- Next, you have to wait for a while for the installation process to finish. Once OpenVPN is installed, click on the “Close” button.
- On the home screen, right-click on the “OpenVPN Connect” option and click on the “Eject” option.
And there you go. OpenVPN has been successfully installed on your Mac.
OpenVPN is an excellent choice to build your custom VPN server. We hope this article helped you to install the tool and configure it properly. If in the future, you no longer want to use this tool anymore, you can uninstall OpenVPN. But we think you will love it.