pbxforce / vpn-server-openvpn

A fully configuered OpenVPN server with SSL Encryption for Alpine, Ubuntu, RHEL, CentOS, Rocky, Arch, OpenSUSE, Kali, Amazon Linux, Mint, PopOS, Debian, Fedora distrubutions.
MIT License
4 stars 1 forks source link
bash openvpn openvpn-configuration openvpn-installer openvpn-server shell-script vpn vpn-client vpn-script vpn-server vpn-servers

openvpn-Install

A fully configuered pbxforce OpenVPN server with SSL Encryption for almost all major distros. Check the list of supported distributions:

Ubuntu, CentOS, Alpine, Redhat (RHEL), Linux Mint, PopOS, Rocky, Kali, Arch Linux, OpenSUSE (leap, tumbleweed, sles), Fedora, Amazon Linux.

Almost all Debian and Fedora distros are supported. New distros are being added constantly.

RUNNING THIS SCRIPT ON CLEAN INSTALL IS ADVISED. ROOT PRIVILEGES ARE NECESSARY TO INSTALL SERVER WITHUOT ERRORS

Simply run the bash script and follow the instructions:

        cd ~/vpn-server-openvpn
        sudo bash install-vpn.sh

For RHEL users: RHEL users needs Redhat subscriptions to install packages from repository. Get the RHEL subscription and register the system before running the script. To register system, use command:

        subscription-manager register

For Alpine users: Alpine comes with 'sh' or 'ash'. There is higher probability of getting error while running this bash script using 'sh' or 'ash'. Users need to instaLl bash before running the script. Use command below to install bash:

        apk add bash

Security and Privacy is Crucial nowdays. Keeping that in mind, this script is written in BASH with much more transparency of what is being installed or changed in the system while installing the server.

For transparency and better understanding, list of all the required packages and necessary changings will be displayed on screen. Read the instructions carefully. Diffie-Hellman 2048-bit key process might take some time.

Run the command and follow the instructions:

       sudo bash client.sh

After completing the installation process, client VPN file will be saved in the current directory under the extension of '.ovpn'. Use that file to connect to the server.

Additional script file 'append.sh' is used to combine the encryption key files and vpn client file together and generate a single file that is used to connect to the VPN Server. Primarily, You don't have to run this file as it's already sourced into 'install-vpn.sh'.

Make sure to run the script from the same directory where your key and certificate files are. A new file will be generated in the same directory.

Connecting to VPN

You can use the client file to connect to VPN on windows, linux, and mac.

For windows:

For Linux:

You can connect to VPN in linux using two ways: GUI or CLI