also add client to wg0 to make permanent

This commit is contained in:
ducoterra
2019-12-30 09:25:25 -05:00
parent 33645d1366
commit cca0968381

View File

@@ -24,5 +24,11 @@ Endpoint = wireguard.ducoterra.net:51820
AllowedIPs = 0.0.0.0/0, ::/0
EOF
cat > /etc/wireguard/wg0.conf <<EOF
[Peer]
PublicKey = $PUBKEY
AllowedIPs = 10.10.0.$ip/32
EOF
wg set wg0 peer $PUBKEY allowed-ips 10.10.0.$ip/32,fd86:ea04:1111::$ip/128
wg