in wg0 setzte du die IP des Servers.
Code: wg0
[Interface]
Address = 10.8.0.1/24,fd08:8:8:8::1/64
ListenPort = 51820
PrivateKey = xxx
PostUp = ufw route allow in on wg0 out on eth0; iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE; ip6tables -t nat -I POSTROUTING -o eth0 -j MASQUERADE
PreDown = ufw route delete allow in on wg0 out on eth0; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
PostDown =
[Peer]
PublicKey = xxx
PresharedKey = xxx
AllowedIPs = 10.8.0.2/32,fd08:8:8:8::2/128
PersistentKeepalive = 25
Display More
in dem Client setzte du die Allow Ip auf 0.0.0.0, wenn du möchstest, dass der gesamte Traffic durch den Wireguard geht.