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.
Installation
Download the script and make it executable.
curl -O https://raw.githubusercontent.com/angristan/openvpn-install/master/openvpn-install.sh
chmod +x openvpn-install.sh
Run the script.
./openvpn-install.sh
You will see your external IP
- Turn off IPv6 support
- Select port
- Select protocol
- Select DNS resolvers
- Disable compression
- Customize encryption if needed
- 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.
Choose the last one — Import from file and select your *.ovpn file.
Hit the Add button and test the connection.
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.