Repository navigation
macOS: traffic bypasses the exit node during dark wakes while the lid is closed #8713
truesysadmin
started this conversation in
Ideas & Feature Requests
Replies: 1 comment
|
Re-tested today on client 0.83.2 (self-hosted server also on 0.83.2). Same behaviour. Lid closed for 64 minutes on battery, same power settings and the same method as above.
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
What happens
NetBird client 0.82.0 on macOS 27.2 (Apple silicon), installed as the system daemon, with an exit node selected.
When the Mac goes to sleep, the daemon runs a full down and removes the tunnel interface and its routes. It runs up again only on a full wake. With the lid closed macOS keeps making dark wakes with Wi-Fi active (Power Nap, TCP keepalive). The daemon does not react to those, so during every dark wake there is no tunnel and traffic leaves through the physical interface with the real IP address.
Measurement
Lid closed for 24 minutes on battery, default power settings (
powernap 1,tcpkeepalive 1,womp 1). A script logged the interface ofroute -n get 1.1.1.1about once a second.en0during all of them and never at the tunnel.A plain WireGuard tunnel (the official macOS app) on the same Mac keeps its route across sleep.
Request
An option to fail closed when an exit node is selected. Either of these would do:
Handling dark wakes in the sleep detector would also help, but a fail-closed option covers the short windows at lid close and lid open as well.
Evidence
Domains are replaced with example.com, peer keys and IP addresses are masked. Times are local.
Client log at lid close
The client wrote nothing between 18:00:03 and 18:23:49.
Client log at lid open
Route trace
The logger only runs while the system is awake, so each gap is a period of real sleep and each stretch between gaps is a dark wake. Gaps shorter than 3 seconds are not shown.
Samples in total 461, of them 378 on en0 and 83 on utun100.
macOS power log (
pmset -g log)Each dark wake is followed by a
Maintenance Sleepline, left out here.How to reproduce
route -n get 1.1.1.1shows the tunnel interface.pmset -g log | grep -E "Entering Sleep|DarkWake from|Wake from".All reactions