Score:1

Wireguard suddenly stopped working

ai flag

About a week ago I managed to run my own Wireguard based vpn server. Everything was fine until a few days ago when I noticed that clients stopped receiving data. Googling the issue didn't get problem solved. I tried analyzing traffic going from a client to the server via wireshark and learned that handshake doesn't complete (endless Handshake initiation packets originating from a client machine with no server response whatsoever). Here's the contents of wg0.conf

[Interface]
PrivateKey = SERVER_PRIVATE_KEY
Address = 192.168.69.1/24
ListenPort = 51820
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -D FORWARD -o wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE

[Peer]
PublicKey = CLIENT_PUBLIC_KEY
AllowedIPs = 192.168.69.8/32

Here's a sample client configuration

[Interface]
PrivateKey = CLIENT_PRIVATE_KEY
Address = 192.168.69.8/32
DNS = 1.1.1.1, 1.0.0.1

[Peer]
PublicKey = SERVER_PUBLIC_KEY
AllowedIPs = 0.0.0.0/0
Endpoint = VPS_IP:51820
PersistentKeepalive = 25

I double checked public/private key contents on both sides to avoid any inconsistencies. I had a suspicion that it's a firewall blocking all traffic, but didn't find anything in a kernel log that would confirm it

FedKad avatar
cn flag
You can try to change the port 51820 to something else, in case somebody is filtering your traffic.
Score:1
ai flag

I finally solved it by regenerating server's public/private key pair!

slightlyfaulty avatar
in flag
Thank you, this is the only thing that worked for me. Thought I was going crazy double and triple checking everything when my clients were suddenly unable to connect after it was working fine for over a year.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.