So I have 1 computer set up as a server and all the others as peers. Here's the server config:
[Interface]
Address = 10.0.0.1/16
SaveConfig = false
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o enp6s0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o enp6s0 -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o enp6s0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o enp6s0 -j MASQUERADE
ListenPort = 51820
PrivateKey = <key>
# ... more peers that work fine ...
[Peer]
PublicKey = <key>
AllowedIPs = 10.0.55.2
And here's the config of the new peer that is causing problems:
[Interface]
Address = 10.0.55.2
SaveConfig = false
ListenPort = 51820
PrivateKey = <key>
[Peer]
PublicKey = <key>
AllowedIPs = 10.0.0.0/16
Endpoint = my.endpoint.com:51820
I can only connect to this new peer AFTER I pinged the server from that new peer. Until then I only get Destination Host Unreachable
messages.
I also tried using just /24 addresses, but that didn't change anything.
Does anyone know what's going wrong?
I guess I could add a ping command as a PostUp
command, but that seems like a poor fix.