I’ve been working with a certain pPeer for a long time now but I needed to remove it and update to a new peer.
in the wg0.conf I simply changed from this:
[Interface]
PrivateKey = <wg_server_private_key>
Address = 10.8.0.22/24
[Peer]
PublicKey = <old_peer_public_key>
AllowedIPs = 10.8.0.0/24
Endpoint = 1.2.3.4:51820
PersistentKeepalive = 25
to this:
[Interface]
PrivateKey = <wg_server_private_key>
Address = 10.8.0.22/24
[Peer]
PublicKey = <new_peer_public_key>
AllowedIPs = 10.8.0.0/24
Endpoint = 11.22.33.44:51820
PersistentKeepalive = 25
I simply updated the Endpoint and the PublicKey
The new peer itself has identical wg0.conf to the old peer, with the new tunnel IP address:
[Interface]
Address = 10.8.0.33/24 # old peer was 10.8.0.11/24
ListenPort = 51820
PrivateKey = <new_peer_private_key>
[Peer]
PublicKey = <wg_server_public_key>
AllowedIPs = 10.8.0.22/32 # the wg server tunnel IP
Now when I check sugo wg I see no handshake:
endpoint: 11.22.33.44:51820
allowed ips: 10.8.0.2/32
transfer: 0 B received, 20.23 KiB sent
persistent keepalive: every 25 seconds
And also when I try to ping, there’s a weird behavior – the server responds with ping: sendmsg: Required key not available (I ping the tunnel IP, but get response from the server):
user@wireguard_server:~$ ping 10.8.0.33
PING 10.8.0.33 (10.8.0.33) 56(84) bytes of data.
From 10.8.0.22 icmp_seq=1 Destination Host Unreachable
ping: sendmsg: Required key not available
Why does the server answer and not the peer, and why do I get this error?
Update: I tried to change back to work with the old peer and it doesn’t work now either, same errors. What happened?
Thanks