Make "NetworkMonitor" toggleable via UI settings #1699

Closed
opened 2025-11-20 06:05:01 -05:00 by saavagebueno · 7 comments
Owner

Originally created by @levindecaro on GitHub (Mar 13, 2025).

Originally assigned to: @nazarewk on GitHub.

Is your feature request related to a problem? Please describe.

I'm always working on multiple VPN connection on my computer, by default netbird detects interfaces change and restart its connection.

Describe the solution you'd like

allow user decide this behaviour to be optional via UI settings.

Originally created by @levindecaro on GitHub (Mar 13, 2025). Originally assigned to: @nazarewk on GitHub. **Is your feature request related to a problem? Please describe.** > I'm always working on multiple VPN connection on my computer, by default netbird detects interfaces change and restart its connection. **Describe the solution you'd like** > allow user decide this behaviour to be optional via UI settings.
saavagebueno added the feature-request label 2025-11-20 06:05:01 -05:00
Author
Owner

@nazarewk commented on GitHub (Mar 13, 2025):

Do you mean you are running multiple Netbird VPN instances or running different VPN solutions simultaneously?

netbird detects interfaces change and restart its connection

Could you elaborate? What do you mean by detects interfaces change and restart its connection?

@nazarewk commented on GitHub (Mar 13, 2025): Do you mean you are running multiple Netbird VPN instances or running different VPN solutions simultaneously? > netbird detects interfaces change and restart its connection Could you elaborate? What do you mean by _detects interfaces change and restart its connection_?
Author
Owner

@levindecaro commented on GitHub (Mar 13, 2025):

Sorry for my initial post, I use fortinet vpn simultaneously, however, while fortinet vpn is up after an established netbird vpn, due to fortinet vpn creates a ppp0 interface, it will trigger netbird reconnect.

@levindecaro commented on GitHub (Mar 13, 2025): Sorry for my initial post, I use fortinet vpn simultaneously, however, while fortinet vpn is up after an established netbird vpn, due to fortinet vpn creates a ppp0 interface, it will trigger netbird reconnect.
Author
Owner

@nazarewk commented on GitHub (Mar 13, 2025):

Not yet sure what exactly is the issue, but either way it seems like we might be missing ppp* pattern in the default interfaces blacklist at
81040ff80a/client/internal/config.go (L41-L44)

@levindecaro could you do the following to check whether this is a cause?

  1. stop netbird
  2. manually edit /etc/netbird/config.json to add ppp at IFaceBlackList field
  3. start netbird again
@nazarewk commented on GitHub (Mar 13, 2025): Not yet sure what exactly is the issue, but either way it seems like we might be missing `ppp*` pattern in the default interfaces blacklist at https://github.com/netbirdio/netbird/blob/81040ff80a40c6fac95520468b17c649453be0ae/client/internal/config.go#L41-L44 @levindecaro could you do the following to check whether this is a cause? 1. stop netbird 2. manually edit `/etc/netbird/config.json` to add `ppp` at `IFaceBlackList` field 3. start netbird again
Author
Owner

@levindecaro commented on GitHub (Mar 14, 2025):

@nazarewk Thanks for your suggestion, after added "ppp0" into black list with NetworkMonitor=True, it doesn't prevent netbird restart, here is the log come after fortivpn.

2025-03-14T12:15:55+08:00 INFO client/internal/networkmonitor/check_change_bsd.go:70: Network monitor: default route changed: via invalid IP, interface
2025-03-14T12:15:57+08:00 INFO client/internal/engine.go:1625: Network monitor: detected network change, restarting engine
2025-03-14T12:15:57+08:00 INFO client/internal/engine.go:1601: restarting engine
2025-03-14T12:15:57+08:00 INFO client/internal/engine.go:1604: cancelling client context, engine will be recreated
2025-03-14T12:15:57+08:00 INFO [relay: rels://relay-apac-1b-0.vpn.example.com:33443] relay/client/client.go:530: closing all peer connections
2025-03-14T12:15:57+08:00 INFO client/internal/connect.go:294: ensuring utun100 is removed, Netbird engine context cancelled
2025-03-14T12:15:57+08:00 INFO client/internal/engine.go:266: Network monitor: stopped
@levindecaro commented on GitHub (Mar 14, 2025): @nazarewk Thanks for your suggestion, after added "ppp0" into black list with NetworkMonitor=True, it doesn't prevent netbird restart, here is the log come after fortivpn. ``` 2025-03-14T12:15:55+08:00 INFO client/internal/networkmonitor/check_change_bsd.go:70: Network monitor: default route changed: via invalid IP, interface 2025-03-14T12:15:57+08:00 INFO client/internal/engine.go:1625: Network monitor: detected network change, restarting engine 2025-03-14T12:15:57+08:00 INFO client/internal/engine.go:1601: restarting engine 2025-03-14T12:15:57+08:00 INFO client/internal/engine.go:1604: cancelling client context, engine will be recreated 2025-03-14T12:15:57+08:00 INFO [relay: rels://relay-apac-1b-0.vpn.example.com:33443] relay/client/client.go:530: closing all peer connections 2025-03-14T12:15:57+08:00 INFO client/internal/connect.go:294: ensuring utun100 is removed, Netbird engine context cancelled 2025-03-14T12:15:57+08:00 INFO client/internal/engine.go:266: Network monitor: stopped ```
Author
Owner

@nazarewk commented on GitHub (Mar 14, 2025):

2025-03-14T12:15:55+08:00 INFO client/internal/networkmonitor/check_change_bsd.go:70: Network monitor: default route changed: via invalid IP, interface

@levindecaro Are you sure you have pasted the whole line, it seems to be either missing interface name or the interface name is empty string due to a bug.

What operating system are you running from?

@nazarewk commented on GitHub (Mar 14, 2025): > 2025-03-14T12:15:55+08:00 INFO client/internal/networkmonitor/check_change_bsd.go:70: Network monitor: default route changed: via invalid IP, interface @levindecaro Are you sure you have pasted the whole line, it seems to be either missing interface name or the [interface name is empty string](https://github.com/netbirdio/netbird/blob/4a3cbcd38a06fdd7dcd391351ae4ed7959ead81a/client/internal/networkmonitor/check_change_bsd.go#L63-L71) due to a bug. What operating system are you running from?
Author
Owner

@levindecaro commented on GitHub (Mar 14, 2025):

@nazarewk yes, it is whole line. and MacOS 15.2 arm64.

@levindecaro commented on GitHub (Mar 14, 2025): @nazarewk yes, it is whole line. and MacOS 15.2 arm64.
Author
Owner

@levindecaro commented on GitHub (Jun 24, 2025):

fixed in #3941 thank you.

@levindecaro commented on GitHub (Jun 24, 2025): fixed in #3941 thank you.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#1699