Allow On-Premise Network Detection or disable VPN based on WAN IP of client #476

Closed
opened 2025-11-20 05:12:04 -05:00 by saavagebueno · 3 comments
Owner

Originally created by @spanishdexter on GitHub (Oct 18, 2023).

Is your feature request related to a problem? Please describe.
Netbird is a great VPN solution, but I feel it could use a On-Premise network detection feature based on the WAN IP address the client is connecting to the NetBird controller from, to auto-disable the VPN. This is a feature that could prevent routing issues in some environments.

Describe the solution you'd like
It would be helpful to have the ability to auto-disable the NetBird routes or disconnect the VPN client when the NetBird controller detects the client is connecting to the Netbird network from a WAN IP address known to the controller, in a list that administrators can populate. This behavior could allow a preference to use the already existing routing in the office LAN, and not use the NetBird defined ones first known to the NetBird client, and allow the local physical LAN router to handle traffic and access to devices on the network as a first priority. Then when the user leaves the on-premise network, do some type of detection in the change of network state and then report the current WAN IP address to the NetBird controller again, and it will do a lookup to see if it's one of the addresses on the exclusion list (or in the event the controller is not online, use a locally cached copy of the list) and if it's not on the exclusion list, then it will auto-reconnect to the NetBird network putting the user back on the VPN automatically and adjusting the local windows (or linux) routing tables accordingly.

This should also be a feature that can be toggled on or off anytime in the Netbird controller, and allow it to be applied to certain peer groups of the administrators choosing.

Describe alternatives you've considered
Use of an event ID in Windows when there is a change in network adapter state to kick off a script that will perform a check similar to the one I described above using text files, ipinfo.io to get the WAN IP and powershell script to access a web server for the lists. And depending on the results, run a netbird down or netbird up command.

Originally created by @spanishdexter on GitHub (Oct 18, 2023). **Is your feature request related to a problem? Please describe.** Netbird is a great VPN solution, but I feel it could use a On-Premise network detection feature based on the WAN IP address the client is connecting to the NetBird controller from, to auto-disable the VPN. This is a feature that could prevent routing issues in some environments. **Describe the solution you'd like** It would be helpful to have the ability to auto-disable the NetBird routes or disconnect the VPN client when the NetBird controller detects the client is connecting to the Netbird network from a WAN IP address known to the controller, in a list that administrators can populate. This behavior could allow a preference to use the already existing routing in the office LAN, and not use the NetBird defined ones first known to the NetBird client, and allow the local physical LAN router to handle traffic and access to devices on the network as a first priority. Then when the user leaves the on-premise network, do some type of detection in the change of network state and then report the current WAN IP address to the NetBird controller again, and it will do a lookup to see if it's one of the addresses on the exclusion list (or in the event the controller is not online, use a locally cached copy of the list) and if it's not on the exclusion list, then it will auto-reconnect to the NetBird network putting the user back on the VPN automatically and adjusting the local windows (or linux) routing tables accordingly. This should also be a feature that can be toggled on or off anytime in the Netbird controller, and allow it to be applied to certain peer groups of the administrators choosing. **Describe alternatives you've considered** Use of an event ID in Windows when there is a change in network adapter state to kick off a script that will perform a check similar to the one I described above using text files, ipinfo.io to get the WAN IP and powershell script to access a web server for the lists. And depending on the results, run a netbird down or netbird up command.
saavagebueno added the waiting-feedback label 2025-11-20 05:12:04 -05:00
Author
Owner

@rafasamp commented on GitHub (Jan 4, 2025):

Yes - I believe that a way for Netbird to detect that it is currently within a few hops away from an exit node would be killer to avoid going out to the web for those routes.

@rafasamp commented on GitHub (Jan 4, 2025): Yes - I believe that a way for Netbird to detect that it is currently within a few hops away from an exit node would be killer to avoid going out to the web for those routes.
Author
Owner

@nazarewk commented on GitHub (Apr 28, 2025):

Hello @spanishdexter,

We're currently reviewing our open issues and would like to verify if this problem still exists in the latest NetBird version.

Could you please confirm if the issue is still there?

We may close this issue temporarily if we don't hear back from you within 2 weeks, but feel free to reopen it with updated information.

Thanks for your contribution to improving the project!

@nazarewk commented on GitHub (Apr 28, 2025): Hello @spanishdexter, We're currently reviewing our open issues and would like to verify if this problem still exists in the [latest NetBird version](https://github.com/netbirdio/netbird/releases). Could you please confirm if the issue is still there? We may close this issue temporarily if we don't hear back from you within **2 weeks**, but feel free to reopen it with updated information. Thanks for your contribution to improving the project!
Author
Owner

@mlsmaycon commented on GitHub (Jun 1, 2025):

closing issue due to no recent feedback. Feel free to open a new one if the issue persist or reopen if this was a feature request.

@mlsmaycon commented on GitHub (Jun 1, 2025): closing issue due to no recent feedback. Feel free to open a new one if the issue persist or reopen if this was a feature request.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#476