[GH-ISSUE #4734] Windows: Posture Check retains IP of disconnected adapter, causing incorrect blocking #9765

Closed
opened 2026-08-05 01:23:24 -04:00 by saavagebueno · 4 comments
Owner

Originally created by @stevo11811 on GitHub (Oct 31, 2025).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/4734

Describe the bug

On Windows, when a wired network adapter is disconnected (e.g., laptop undocked), NetBird continues to retain the previous IP address of that interface. This causes Posture Checks to incorrectly detect the user as still on the restricted network.

Because the stale IP is not cleared, Posture Check rules continue to block traffic until the adapter is manually disabled/enabled or the system is rebooted.


To Reproduce

  1. Connect a Windows laptop to a network via Ethernet that is restricted by a Posture Check rule (e.g., block 192.168.110.0/24).
  2. Disconnect the Ethernet cable (interface shows Media disconnected).
  3. Connect to a different network via Wi-Fi.
  4. NetBird still reports the original Ethernet IP, and the Posture Check continues to block traffic.

Expected behavior

NetBird should dynamically remove stale IP addresses of down/unplugged interfaces on Windows, so Posture Checks reflect the currently active networks.


Actual behavior

  • Disconnected interfaces retain their last IP.
  • NetBird continues using the stale IP for Posture Check evaluation.
  • Running netbird down / netbird up does not refresh the IP list.
  • Only disabling/enabling the NIC or rebooting clears the stale IP.

Environment

  • OS: Windows 10/11
  • Client Version: Latest
  • Reproducible: Yes, on multiple devices

Temporary Workaround

A script can clear stale DHCP IPv4 addresses from disconnected adapters and restart NetBird on network change, but this should not be required.


Impact

Users who move between networks (e.g., office wired → home Wi-Fi) are incorrectly blocked from accessing NetBird resources until reboot or manual NIC reset.


Additional context

This issue does not appear to occur on Linux; behavior seems Windows-specific.

Originally created by @stevo11811 on GitHub (Oct 31, 2025). Original GitHub issue: https://github.com/netbirdio/netbird/issues/4734 ### Describe the bug On Windows, when a wired network adapter is disconnected (e.g., laptop undocked), NetBird continues to retain the previous IP address of that interface. This causes Posture Checks to incorrectly detect the user as still on the restricted network. Because the stale IP is not cleared, Posture Check rules continue to block traffic until the adapter is manually disabled/enabled or the system is rebooted. --- ### To Reproduce 1. Connect a Windows laptop to a network via Ethernet that is restricted by a Posture Check rule (e.g., block `192.168.110.0/24`). 2. Disconnect the Ethernet cable (interface shows **Media disconnected**). 3. Connect to a different network via Wi-Fi. 4. NetBird still reports the original Ethernet IP, and the Posture Check continues to block traffic. --- ### Expected behavior NetBird should dynamically remove stale IP addresses of down/unplugged interfaces on Windows, so Posture Checks reflect the currently active networks. --- ### Actual behavior - Disconnected interfaces retain their last IP. - NetBird continues using the stale IP for Posture Check evaluation. - Running `netbird down` / `netbird up` does **not** refresh the IP list. - Only disabling/enabling the NIC or rebooting clears the stale IP. --- ### Environment - **OS:** Windows 10/11 - **Client Version:** Latest - **Reproducible:** Yes, on multiple devices --- ### Temporary Workaround A script can clear stale DHCP IPv4 addresses from disconnected adapters and restart NetBird on network change, but this should not be required. --- ### Impact Users who move between networks (e.g., office wired → home Wi-Fi) are incorrectly blocked from accessing NetBird resources until reboot or manual NIC reset. --- ### Additional context This issue does not appear to occur on Linux; behavior seems Windows-specific.
saavagebueno added the triage-needed label 2026-08-05 01:23:24 -04:00
Author
Owner

@stevo11811 commented on GitHub (Nov 13, 2025):

This is quite a breaking bug to be honest. I would love to help where possible, hope this is triaged soon.

<!-- gh-comment-id:3529574741 --> @stevo11811 commented on GitHub (Nov 13, 2025): This is quite a breaking bug to be honest. I would love to help where possible, hope this is triaged soon.
Author
Owner

@stevo11811 commented on GitHub (Nov 18, 2025):

client/firewall/uspfilter/localip.go

This patch seems to fix the issue with the local IP, but the management server "Update" is not being triggered so the posture check still applies until netbird is restarted.

Image
<!-- gh-comment-id:3549075981 --> @stevo11811 commented on GitHub (Nov 18, 2025): client/firewall/uspfilter/localip.go This patch seems to fix the issue with the local IP, but the management server "Update" is not being triggered so the posture check still applies until netbird is restarted. <img width="1120" height="332" alt="Image" src="https://github.com/user-attachments/assets/91040f71-c1c8-4f57-a17a-c956fa48bbd0" />
Author
Owner

@acaronmd commented on GitHub (Nov 27, 2025):

I'm also facing this issue as I begin my rollout to end users. I'm working on configuring a scheduled task to run when a network change is detected to:

  1. Clear deprecated IPs using Remove-NetIPAddress -AddressState Deprecated
  2. Restart the Netbird client using netbird service restart

Hope there is a fix soon.

<!-- gh-comment-id:3587031318 --> @acaronmd commented on GitHub (Nov 27, 2025): I'm also facing this issue as I begin my rollout to end users. I'm working on configuring a scheduled task to run when a network change is detected to: 1. Clear deprecated IPs using `Remove-NetIPAddress -AddressState Deprecated` 2. Restart the Netbird client using `netbird service restart` Hope there is a fix soon.
Author
Owner

@lixmal commented on GitHub (Apr 8, 2026):

Fixed by #5768 which skips down interfaces when collecting network addresses for posture checks, released in v0.68.0.

<!-- gh-comment-id:4205340463 --> @lixmal commented on GitHub (Apr 8, 2026): Fixed by #5768 which skips down interfaces when collecting network addresses for posture checks, released in v0.68.0.
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#9765