[GH-ISSUE #5561] Reverseproxy cookies invalidated on network change #10773

Open
opened 2026-08-05 01:27:14 -04:00 by saavagebueno · 0 comments
Owner

Originally created by @iecxiv on GitHub (Mar 10, 2026).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/5561

Possible session issue when client IP changes (mobile network switch)

I'm running MeshCentral behind a reverse proxy setup that includes the NetBird reverse-proxy component.

Observed behaviour

  1. Open the MeshCentral web UI from a mobile browser.
  2. The session works normally.
  3. Switch network (WiFi → mobile data).
  4. The web UI suddenly asks for login again.
  5. Without logging in, switching back to the original network restores the authenticated session automatically.

Important detail

The session is not actually expired on the server.

Returning to the original network immediately restores the authenticated session, which suggests the backend session cookie is still valid.

Possible explanation

This behaviour suggests that when the client IP changes:

  • the WebSocket connection is dropped
  • the reverse proxy may not correctly handle reconnection
  • headers such as X-Forwarded-For or X-Real-IP might change between connections

MeshCentral relies heavily on persistent WebSocket connections and cookie sessions.

Environment

  • Reverse proxy: Traefik
  • TLS termination: Traefik
  • NetBird reverse-proxy used for exposing services
  • MeshCentral configuration includes:
tlsOffload: true
SessionIpCheck: false
trustedProxy configured

Question

Could the NetBird reverse-proxy be interrupting or mis-handling WebSocket reconnections when the client IP changes (for example when switching networks on mobile devices)?

Specifically related to:

  • WebSocket upgrade handling
  • connection state tracking
  • header forwarding (X-Forwarded-For, X-Real-IP)

This behaviour is reproducible when switching networks on mobile devices.

Originally created by @iecxiv on GitHub (Mar 10, 2026). Original GitHub issue: https://github.com/netbirdio/netbird/issues/5561 ### Possible session issue when client IP changes (mobile network switch) I'm running MeshCentral behind a reverse proxy setup that includes the NetBird reverse-proxy component. ### Observed behaviour 1. Open the MeshCentral web UI from a mobile browser. 2. The session works normally. 3. Switch network (WiFi → mobile data). 4. The web UI suddenly asks for login again. 5. Without logging in, switching back to the original network restores the authenticated session automatically. ### Important detail The session is **not actually expired on the server**. Returning to the original network immediately restores the authenticated session, which suggests the backend session cookie is still valid. ### Possible explanation This behaviour suggests that when the client IP changes: - the WebSocket connection is dropped - the reverse proxy may not correctly handle reconnection - headers such as `X-Forwarded-For` or `X-Real-IP` might change between connections MeshCentral relies heavily on persistent WebSocket connections and cookie sessions. ### Environment - Reverse proxy: Traefik - TLS termination: Traefik - NetBird reverse-proxy used for exposing services - MeshCentral configuration includes: ``` tlsOffload: true SessionIpCheck: false trustedProxy configured ``` ### Question Could the NetBird reverse-proxy be interrupting or mis-handling WebSocket reconnections when the client IP changes (for example when switching networks on mobile devices)? Specifically related to: - WebSocket upgrade handling - connection state tracking - header forwarding (`X-Forwarded-For`, `X-Real-IP`) This behaviour is reproducible when switching networks on mobile devices.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#10773