View all posts

How to install OpenVPN in seconds!

There is a great script on GitHub that allows you to install OpenVPN for Debian, Ubuntu, Fedora, CentOS, Arch Linux, Oracle Linux, Rocky Linux and AlmaLinux in seconds.

Install OpenVPN

First, get the script and make it executable:

curl -O https://raw.githubusercontent.com/angristan/openvpn-install/master/openvpn-install.sh
chmod +x openvpn-install.sh

Now we can run it:

./openvpn-install.sh

This script must be run as root and with the TUN module (included in most Linux distros) enabled.

It will ask a few questions when you run it for the first time to configure your VPN server.

As soon as OpenVPN is installed, you can run the script again, and you will be given the option to:

  • Add a client
  • Remove a client
  • Uninstall OpenVPN

You will find .ovpn files in your home directory. These files contain the client configuration. Download them from your server and use your favourite OpenVPN software to connect.

Here’s what the script looks like:

[root@vpn ~]# ./openvpn-install.sh
Welcome to OpenVPN-install!
The git repository is available at: https://github.com/angristan/openvpn-install
It looks like OpenVPN is already installed.
What do you want to do?
  1) Add a new user
  2) Revoke existing user
  3) Remove OpenVPN
  4) Exit

Connect to the OpenVPN

First, download the OpenVPN client for your device:

Next, open your VPN and import the .ovpn file that was created during the Add User process.

That’s it!

Related Articles...

How to sync server time

How to sync server time in CentOS & AlmaLinux

The NTP protocol synchronises the clocks of computers over a network. In this article, we will show you how to quickly sync the server time. Many systems-related tasks and processes require the correct timezone. For example, the cron daemon uses... Read more

This website uses cookies

We use cookies for the analysis of our visitor data, to improve our website, and to give you a great website experience. For more information about the cookies we use, please see our cookie policy.