OpenVPN provides flexible VPN solutions to secure your data communications, whether it’s for Internet privacy, remote access for employees, securing IoT, or for networking Cloud data centers.

In this tutorial, I will show you to install and configure OpenVPN server. You need a server with dedicated IP and Debian, Ubuntu, Fedora, CentOS, Arch Linux installed.


Download the script and make it executable.

curl -O
chmod +x


Run the script.



You will see your external IP 

  1. Turn off IPv6 support
  2. Select port 
  3. Select protocol
  4. Select DNS resolvers
  5. Disable compression
  6. Customize encryption if needed
  7. Press any key to start the installation of the other software packages and dependencies.

Now you should provide the name of the client. The client file will be stored in your home directory with a .ovpn file extension.


When OpenVPN is installed, you can run the script again, and you will get the choice to:

  • Add a client
  • Remove a client
  • Uninstall OpenVPN

Configure OpenVPN client on Linux

Navigate Setting – Network and hit “+” button near VPN section.

add config

Choose the last one – Import from file and select your *.ovpn file.

add vpn

Hit the Add button and test the connection.

my ip

Configure OpenVPN client on Windows

You will need to download the official OpenVPN client here

Install it and import your *.ovpn file.


That’s all, you have successfully set up your own OpenVPN server.