Update Wireguard LXC - Information about WGDashboard added (#261)

* Update wireguard-install.sh

* Update wireguard.json (Add Documentation & Infos)

* Remove admin|admin

* Naming

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>

* Naming 2

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>

* Update json/wireguard.json

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>

* Update json/wireguard.json

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>

* Update wireguard.json

* Update json/wireguard.json

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>

* remove empty note

---------

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>
This commit is contained in:
CanbiZ
2024-11-16 17:14:41 +01:00
committed by GitHub
parent 0b5b2e85f7
commit 6d915bf156
3 changed files with 22 additions and 4 deletions

View File

@@ -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 "Create 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 Config for WGDashboard"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/wg-dashboard.service
[Unit]