WireGuard VPN installer on Ubuntu (OpenVZ environment)

his script is being developed and tested for this environment and requirements:

  • Ubuntu 20.04 LTS
  • OpenVZ container

The following bash script installs a userspace WireGuard implementation and a web GUI allowing you to manage the VPN. The software is used every time a customer purchase a Dedicated VPN instance.

#!/bin/sh
#!/bin/bash

#Variables
IP=$(hostname -I | awk '{print $2}')
SslKeyPath='/etc/nginx/ssl/priv.key'
SslCertPath='/etc/nginx/ssl/ssl.crt'
UiScreen=$(screen -ls | grep Detached | awk '{print $1}')
PasswordGenerator=$( /etc/wireguard/dedicated_public_key

ClientPrivateKey=$(cat /etc/wireguard/dedicated_private_key)
ClientPubkey=$(cat /etc/wireguard/dedicated_public_key)

#Append initial config to the UI
tee /usr/local/src/ui/db/server/global_settings.json <

你可能感兴趣的:(ubuntu,linux,虚拟化,ubuntu,linux,运维)