Windows client installs metric-1 wt0 routes for LAN-native subnet and blackholes native traffic #7565
Replies: 1 comment
|
Do not shadow locally-attached routes (all desktop platforms). Extend the existing BSD-only guard to Stop hardcoding Windows metric 1. |
Uh oh!
There was an error while loading. Please reload this page.
Before posting
Affected area
Client / Agent, Peer connectivity, Routes / Exit nodes
Deployment type
Self-hosted - advanced/custom deployment
Operating system or environment
Windows
NetBird version and upgrade status
Client:
0.78.2(Windows GUI + Debian LXC router, same release line)Management:
0.78.2Signal:
0.78.2(combinednetbird-serverimage)Relay:
0.78.2Did this work before?
No, this never worked
Regression details
No response
Summary
Client installs metric-1
wt0routes for a LAN it is natively attached to, blackholing native traffic to that LAN via the mesh router.What is broken?
LAN-native + mesh peer receiving Networks routes for its own local subnet sends on-link traffic into
wt0instead of the physical adapter.Current behavior
192.168.1.0/24 via wt0 metric 1192.168.1.10/32 via wt0 metric 1192.168.1.7/32 via wt0 metric 1shadowing native
192.168.1.0/24 via vEthernet metric 256. Ping to two critical LAN hosts fails with timeouts, no client/router error logged. Disabling the router withdraws routes cleanly in 2-3s. Reproduced 3/3, outage bound by watchdog. GUIEnable Client Routesoff alone did not stop install without restart.Expected behavior
Client should not shadow a working directly-connected route with a tunnel route. Either skip install when prefix is locally attached, install at a metric that does not beat the native route, or require explicit opt-in. At minimum GUI toggle should warn restart is required.
Steps to reproduce
Home LANwith resources192.168.1.0/24,192.168.1.10/32,192.168.1.7/32, router peer on same L2 (192.168.1.20), masquerade true, metric 100.192.168.1.0/24policy access to those resources.Get-NetRoutebaseline, thenPUT /api/networks/{id}/routers/{id}{"enabled":true}.wt0 metric 1entries appear, ping to native.6/.10fails.Environment and topology
Peer A (affected): Windows 11 desktop, native
192.168.1.x/24via Hyper-V external switch, mesh100.86.x.x/16viawt0.Peer B (router): Debian 12 LXC on same bridge, LAN
192.168.1.20/24, mesh100.86.x.x.Same LAN or different networks: same physical L2 (
192.168.1.0/24).NAT/CGNAT/corporate firewall/mobile network: None. Flat home LAN.
Other VPN software: None.
Firewall, DNS, endpoint security: Pi-hole at
.10is itself a victim; router nft clean on disable.Routes, DNS, policies, posture checks, or SSH rules involved: Networks resources above, router
peer_groups: [routing-peers], peer inHome LANgroup via legacy broad policy.IdP, reverse proxy, or browser involved: Traefik in front of self-hosted control plane for API only.
Self-hosted details, if available
Deployment method: custom Docker Compose, combined server + Traefik.
Management/signal/relay/dashboard versions:
0.78.2combined image.Reverse proxy: Traefik.
IdP/provider: N/A to repro.
STUN/TURN/coturn/relay details: N/A, peers direct/relay unaffected.
Relevant component logs: no errors observed client or router side; failure is silent wrong-egress.
Logs, status output, or debug evidence
Related issues or discussions
Related issue/discussion: #4990
Local subnets relaying due to route metrics.Why this may be the same: same Windows metric-precedence symptom for on-prem clients, likely same root cause. Propose linking.
Related issue/discussion: #7215 FreeBSD
/32shadowing mesh subnets.Why this may be the same: same silent-blackhole class, different trigger (peer-LAN
/32via physical GW vs Networks/24+/32viawt0 metric 1). Cross-platform analog only.Impact
Affected users/peers: any peer simultaneously LAN-native and mesh-authorized for that LAN. 1 host confirmed, pattern affects all such Windows peers; code path exists on Linux/macOS/BSD.
Business or production impact: loss of hypervisor + DNS admin access from primary workstation during enable.
Workaround available: Yes. Disable Networks router restores in seconds. Client
DisableClientRoutesworks only after full restart (down/up), not live toggle. Least-privilege group removal also avoids install.Additional context
Code pointers for triage:
client/internal/routemanager/systemops/systemops_windows.go:274hardcodesMetric = 1;client/internal/routemanager/static/route.go:37,systemops_generic.go:212install path; local-subnet guard is BSD-only insystemops_generic.go:124-130and only for legacy exclusion routes, notAddVPNRoute;client/server/server.go:481-542+client/internal/connect.go:663+routemanager/manager.go:141show toggle needs restart.All reactions