Wireguard doesn't connect in Windows 11 24H2

Microsoft pushed an update in Windows 11 24H2 that breaks out-of-box functionality of the WireGuard VPN. This will typically manifest itself in WireGuard repeatedly sending the handshake initiation, or the tunnel connecting briefly and then dropping within 15–30 seconds.

Fix 1 — Enable Virtualization Technology

Make sure WireGuard is disabled before proceeding, as it can interfere with internet connectivity during this process.

  • Open the Start menu and type Windows Features, then select Turn Windows features on or off
  • Scroll down and select Virtual Machine Platform
  • Click OK
  • Download features if prompted
  • Reboot
  • Attempt connection

Fix 2 — Edit the WireGuard Configuration

  • Open WireGuard
  • Select the connection experiencing issues
  • Change the AllowedIPs line to: AllowedIPs = 0.0.0.0/0
  • Click Save
  • Attempt connection

Fix 3 — Add a Persistent Keepalive

Some network connections — particularly mobile hotspots/tethering and restrictive guest WiFi networks — use aggressive NAT that drops idle UDP sessions. This causes the tunnel to silently die shortly after connecting even though the initial handshake succeeded. Adding a keepalive prevents this by sending a small packet periodically to maintain the NAT mapping.

  • Open WireGuard
  • Select the connection experiencing issues
  • Click Edit
  • Add the following line under the [Peer] section: PersistentKeepalive = 25
  • Click Save
  • Attempt connection

Note: This fix is specifically for connections that establish successfully but drop within 15–30 seconds. It is most commonly needed on cellular tethered connections and corporate or hotel guest networks. It has no effect on connections where the handshake itself is failing.

Last Resort — Reboot the WireGuard Server

If none of the above resolve the issue, try rebooting the device hosting the WireGuard server. This could be a VM, an appliance such as a UniFi Dream Machine, or similar hardware.