mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-06 07:49:17 +00:00
Update wireguard-install.sh
This commit is contained in:
parent
659fa2edf7
commit
582d6fc06a
@ -36,6 +36,19 @@ echo "net.ipv4.ip_forward=1" >>/etc/sysctl.conf
|
||||
$STD sysctl -p /etc/sysctl.conf
|
||||
msg_ok "Installed WGDashboard"
|
||||
|
||||
msg_info "Setup Example Config for WGDashboard"
|
||||
private_key=$(wg genkey)
|
||||
cat <<EOF >/etc/wireguard/wg0.conf
|
||||
[Interface]
|
||||
PrivateKey = ${private_key}
|
||||
Address = 10.0.0.1/24
|
||||
SaveConfig = true
|
||||
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;
|
||||
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -D FORWARD -o wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE;
|
||||
ListenPort = 51820
|
||||
EOF
|
||||
msg_ok "Created Example WGDashboard-Config"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/wg-dashboard.service
|
||||
[Unit]
|
||||
|
Loading…
Reference in New Issue
Block a user