My server config:
[Interface]
Address = 10.6.0.1
ListenPort = 51820
PrivateKey = xxx
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
[Peer]
# peer1
PublicKey = xxx
AllowedIPs = 10.6.0.2/32
My client:
[Interface]
Address = 10.6.0.2
PrivateKey = xxx
ListenPort = 51820
DNS = 8.8.8.8
[Peer]
PublicKey = xxx
Endpoint = xxx:51820
# AllowedIPs = 10.6.0.2/32, 10.6.0.1/32
AllowedIPs = 10.6.0.1/32
If I start services in the container running wireguard, I can access them via http://10.6.0.1:5000/
; But I can’t access the real server’s localhost.