Describe the problem
This issue was discovered internally, but we are reporting it for visibility and the benefit of the community.
In short, systemd-networkd is gradually introducing the deletion of "foreign" (external to networkd) configurations upon startup. This is known to disrupt some networking (especially VPN) software, including NetBird.
We don't know the exact scenarios resulting in systemd-networkd.service restarting, but one possibility might be recovering from sleep/suspend.
The default configuration is as follows:
- ❓
ManageForeignRoutes=true since v246 - possibly affects NetBird
- 💣
ManageForeignRoutingPolicyRules=true since v249 - confirmed to affect NetBird
- ❔
ManageForeignNextHops=true since v256 - I don't think we use this one as of writing the report
We are still considering a number of different countermeasures to take, but you can disable this behaviour yourself by creating a file at /etc/systemd/networkd.conf.d/10-dont-break-vpn.conf (the name doesn't really matter as long as it ends with .conf) with the following content:
[Network]
ManageForeignRoutes=false
ManageForeignRoutingPolicyRules=false
ManageForeignNextHops=false
To Reproduce
To check whether you are affected see if systemd-networkd is running:
> systemctl status systemd-networkd.service
● systemd-networkd.service - Network Configuration
Loaded: loaded (/etc/systemd/system/systemd-networkd.service; enabled; preset: ignored)
...
Active: active (running) since Thu 2025-10-02 11:16:22 CEST; 6h ago
...
Then try to reproduce the issue:
ip rule
netbird up
ip rule
systemctl restart systemd-networkd
ip rule
on the 2nd run of ip rule you will notice 2 new rules:
105: from all lookup main suppress_prefixlength 0
110: not from all fwmark 0x1bd00 lookup 7120
on the 3rd run of ip rule you will notice the above rules being deleted
Expected behavior
The rules are either preserved and/or recreated reasonably soon (a few seconds) after removal.
Are you using NetBird Cloud?
n/a
NetBird version
n/a
Is any other VPN software installed?
n/a
Debug output
n/a
Screenshots
n/a
Additional context
Have you tried these troubleshooting steps?
Describe the problem
This issue was discovered internally, but we are reporting it for visibility and the benefit of the community.
In short,
systemd-networkdis gradually introducing the deletion of "foreign" (external tonetworkd) configurations upon startup. This is known to disrupt some networking (especially VPN) software, including NetBird.We don't know the exact scenarios resulting in
systemd-networkd.servicerestarting, but one possibility might be recovering from sleep/suspend.The default configuration is as follows:
ManageForeignRoutes=truesincev246- possibly affects NetBirdManageForeignRoutingPolicyRules=truesincev249- confirmed to affect NetBirdManageForeignNextHops=truesincev256- I don't think we use this one as of writing the reportWe are still considering a number of different countermeasures to take, but you can disable this behaviour yourself by creating a file at
/etc/systemd/networkd.conf.d/10-dont-break-vpn.conf(the name doesn't really matter as long as it ends with.conf) with the following content:To Reproduce
To check whether you are affected see if
systemd-networkdis running:Then try to reproduce the issue:
on the 2nd run of
ip ruleyou will notice 2 new rules:on the 3rd run of
ip ruleyou will notice the above rules being deletedExpected behavior
The rules are either preserved and/or recreated reasonably soon (a few seconds) after removal.
Are you using NetBird Cloud?
n/a
NetBird version
n/a
Is any other VPN software installed?
n/a
Debug output
n/a
Screenshots
n/a
Additional context
Have you tried these troubleshooting steps?