NetworkManager 1.22 changes wireguard listen port #605

Open
opened 2025-11-20 05:14:38 -05:00 by saavagebueno · 2 comments
Owner

Originally created by @KlausPopp on GitHub (Feb 2, 2024).

Describe the problem

There are problems with netbird 0.25.5 in combination with NetworkManager 1.22.
The problem is: When netbird brings the wt0 device up, it assigns the listen port to the value in /etc/netbird/config.json usually 51820. Now, NetworkManager is triggered and recognizes a new wireguard device and it wants to configure it. The result is that it assigns a new, random port number to wt0. However, netbird is not aware of that change and so the other peers are not informed about the new port number. The result is that the wireguard connection isn't working at all.

To Reproduce

  • Use netbird 0.25.5 and NetworkManager 1.22.
  • Ensure NetworkManager and Netbird Service is started
  • netbird up
  • Get the wt0 listen port by entering "wg"
  • Result: ListenPort is different than in /etc/netbird/config.json
  • Enter netbird status -d
  • Result: No Wireguard handshake for most peers

Expected behavior

wt0 Listen port should be the same as in /etc/netbird/config.json

Are you using NetBird Cloud?

yes

NetBird version

0.25.5

Additional context

Add any other context about the problem here.

Linux Kernel 5.4.193 with patches, out-of-tree wireguard module

Originally created by @KlausPopp on GitHub (Feb 2, 2024). **Describe the problem** There are problems with netbird 0.25.5 in combination with NetworkManager 1.22. The problem is: When netbird brings the wt0 device up, it assigns the listen port to the value in /etc/netbird/config.json usually 51820. Now, NetworkManager is triggered and recognizes a new wireguard device and it wants to configure it. The result is that it assigns a new, random port number to wt0. However, netbird is not aware of that change and so the other peers are not informed about the new port number. The result is that the wireguard connection isn't working at all. **To Reproduce** - Use netbird 0.25.5 and NetworkManager 1.22. - Ensure NetworkManager and Netbird Service is started - netbird up - Get the wt0 listen port by entering "wg" - Result: ListenPort is different than in `/etc/netbird/config.json` - Enter `netbird status -d` - Result: No Wireguard handshake for most peers **Expected behavior** wt0 Listen port should be the same as in `/etc/netbird/config.json` **Are you using NetBird Cloud?** yes **NetBird version** 0.25.5 **Additional context** Add any other context about the problem here. Linux Kernel 5.4.193 with patches, out-of-tree wireguard module
saavagebueno added the feature-requestsystem-compatibility-issueconfig-issue labels 2025-11-20 05:14:38 -05:00
Author
Owner

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

@KlausPopp is it still the case for you in the latest version?

Personally I think this is a case of NetworkManager being too eager to take over control of the interface, but it would be possible to tackle by managing a drop-in config file as explained in https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/8/html/configuring_and_managing_networking/configuring-networkmanager-to-ignore-certain-devices_configuring-and-managing-networking#permanently-configuring-a-device-as-unmanaged-in-networkmanager_configuring-networkmanager-to-ignore-certain-devices

@nazarewk commented on GitHub (Apr 18, 2025): @KlausPopp is it still the case for you in the latest version? Personally I think this is a case of NetworkManager being too eager to take over control of the interface, but it would be possible to tackle by managing a drop-in config file as explained in https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/8/html/configuring_and_managing_networking/configuring-networkmanager-to-ignore-certain-devices_configuring-and-managing-networking#permanently-configuring-a-device-as-unmanaged-in-networkmanager_configuring-networkmanager-to-ignore-certain-devices
Author
Owner

@KlausPopp commented on GitHub (Apr 18, 2025):

Hi, it's not an issue for me anymore, as we are no longer working on that project.

@KlausPopp commented on GitHub (Apr 18, 2025): Hi, it's not an issue for me anymore, as we are no longer working on that project.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#605