OpenVPN installation has only been tested on: Almalinux 8, RockyLinux 8, Ubuntu 22.04, Ubuntu 22.04 with 64 bits platforms
You can connect the whmcs system, email and telegram alerts, web customer management and automatic download / installation for customers.
First, get the script and make it executable:
curl -L -o /opt/openvpn.sh https://raw.githubusercontent.com/hostingfuze/vpn-hfn/main/openvpn.sh --silent
chmod +x /opt/openvpn.sh
Then run it:
/opt/openvpn.sh
You need to run the script as root and have the TUN module enabled.
The first time you run it, you'll have to follow the assistant and answer a few questions to setup your VPN server.
- Public IPv4 address / hostname
.ovpn
- The name of sever generates the link web server and vpn server
- example download files client : https://servername or ip/hfn-client/
files.ovpn
- Protocol server OpenVPN
TCP
UDP
- Port OpenVPN
- The port where the client connects
- DNS server for clients
- those of the system are recommended
- for good protection use:
1.1.1.3
1.0.0.3
- Internal subnet IPv4 and Internal subnet IPv6
- You can choose which subnets you want to use for your vpn network
After answering the questions above, confirm the installation and start the openvpn server
Now, after installing the openvpn server, we install the web server for management and for the client to have the opportunity to register or download the file .ovpn
For management I chose OpenLiteSpeed.
During the installation/configuration process, the system will ask for some confirmations.
For access from the web interface for the admin, it is necessary to configure a password for the openvpn user. For change password use: