[GH-ISSUE #1650] netbird in wsl2 / forcing user space wireguard #2860

Closed
opened 2026-08-05 00:49:19 -04:00 by saavagebueno · 3 comments
Owner

Originally created by @lambadalambda on GitHub (Feb 29, 2024).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/1650

Describe the problem

First, thank you for the excellent software!

I have netbird running inside wsl2. It connects fine, but no traffic seems to pass. Forcing user space wireguard as described in https://docs.netbird.io/how-to/troubleshooting-client#enabling-wire-guard-in-user-space makes everything work, but I don't see any way to enable this for good in the configuration. I'm not sure why no traffic is flowing in kernel mode, but I don't really care about that as long as user mode works.

To Reproduce

Steps to reproduce the behavior:

  1. Install netbird in wsl2
  2. Connect to a peer
  3. Connection works, but traffic doesn't flow.

Expected behavior

It should work :)

Are you using NetBird Cloud?

This is self-hosted.

NetBird version

0.26.2

Originally created by @lambadalambda on GitHub (Feb 29, 2024). Original GitHub issue: https://github.com/netbirdio/netbird/issues/1650 **Describe the problem** First, thank you for the excellent software! I have netbird running inside wsl2. It connects fine, but no traffic seems to pass. Forcing user space wireguard as described in https://docs.netbird.io/how-to/troubleshooting-client#enabling-wire-guard-in-user-space makes everything work, but I don't see any way to enable this for good in the configuration. I'm not sure why no traffic is flowing in kernel mode, but I don't really care about that as long as user mode works. **To Reproduce** Steps to reproduce the behavior: 1. Install netbird in wsl2 2. Connect to a peer 3. Connection works, but traffic doesn't flow. **Expected behavior** It should work :) **Are you using NetBird Cloud?** This is self-hosted. **NetBird version** 0.26.2
saavagebueno added the triage-needed label 2026-08-05 00:49:19 -04:00
Author
Owner

@cmjdev commented on GitHub (Mar 10, 2025):

Have you tried adding NB_WG_KERNEL_DISABLED=true to your bashrc? This is just an environment variable that netbird should pick up automatically.

<!-- gh-comment-id:2710755496 --> @cmjdev commented on GitHub (Mar 10, 2025): Have you tried adding NB_WG_KERNEL_DISABLED=true to your bashrc? This is just an environment variable that netbird should pick up automatically.
Author
Owner

@Gregor1996 commented on GitHub (Jan 20, 2026):

I experienced the same issue and found a solution!

The problem is that WSL2's eth0 interface (which transfers data between WSL and Windows) has a default MTU of 1280. This is exactly equal to NetBird's default MTU, so there's no headroom for WireGuard encapsulation overhead (~60-80 bytes). As a result, larger packets are silently dropped.

Symptoms:

  • ping works fine (small packets)
  • TCP connections hang during TLS handshake (larger packets ~1240 bytes get dropped)
  • tcpdump shows retransmissions that never arrive on the Windows side

Solution:
Increase the eth0 MTU to standard Ethernet size:

sudo ip link set eth0 mtu 1500

This persisted across WSL reboots for me. If it doesn't persist for you, add it to a startup script.

Environment: Windows 11, WSL2, NetBird 0.63.0 running in Docker with network_mode: host

<!-- gh-comment-id:3773226548 --> @Gregor1996 commented on GitHub (Jan 20, 2026): I experienced the same issue and found a solution! The problem is that WSL2's `eth0` interface (which transfers data between WSL and Windows) has a default MTU of 1280. This is exactly equal to NetBird's default MTU, so there's no headroom for WireGuard encapsulation overhead (~60-80 bytes). As a result, larger packets are silently dropped. **Symptoms:** - `ping` works fine (small packets) - TCP connections hang during TLS handshake (larger packets ~1240 bytes get dropped) - `tcpdump` shows retransmissions that never arrive on the Windows side **Solution:** Increase the `eth0` MTU to standard Ethernet size: ```bash sudo ip link set eth0 mtu 1500 ``` This persisted across WSL reboots for me. If it doesn't persist for you, add it to a startup script. **Environment:** Windows 11, WSL2, NetBird 0.63.0 running in Docker with `network_mode: host`
Author
Owner

@PizzaLovingNerd commented on GitHub (May 30, 2026):

Closing with @Gregor1996 solution. Cheers!

<!-- gh-comment-id:4585530066 --> @PizzaLovingNerd commented on GitHub (May 30, 2026): Closing with @Gregor1996 solution. Cheers!
Sign in to join this conversation.
No Label triage-needed
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#2860