netbirdio / netbird

Connect your devices into a single secure private WireGuard®-based mesh network with SSO/MFA and simple access controls.
https://netbird.io
BSD 3-Clause "New" or "Revised" License
9.78k stars 424 forks source link

LAN conections are relayed while using network routes #2159

Open krishne35 opened 1 week ago

krishne35 commented 1 week ago

Describe the problem Im trying to expose ip range 10.0.0.0/16 on a linux machine running arch with netbird the problem is when i do expose it and assgin a peer to the said route it will not connect to the peer directly insted its relayed while im connected to wifi (LAN) which resulting is hight bandwidth usage

To Reproduce Create two peers one on linux and one on android route ip range 10.0.0.0/16 adn assign it to Android peer and try to access the ip while conected to Same network it will be relayed insted of direct connection Expected behavior connect to peer directly when on same lan

Are you using NetBird Cloud? Im using default Management

NetBird version

Linux: 0.28.0 Android: 0.27.9

pascal-fischer commented 1 week ago

Hi @krishne35, this is how the system works at the moment. You can disable the route on your peer manually so it will not route traffic when you are in the office and switch it back on when you leave. We will see what we can for the client to detect that by itself and not route while on the same lan.

krishne35 commented 1 week ago

Well we can't do that on android client sadly One option would be to allow lan implementation of tailscale

pascal-fischer commented 1 week ago

Ah true, android does not implement this yet. Another option that might work for the time being is using posture checks. If you have the policy to access the exit node you can set up the ip range posture check to not allow connection to the exit node this way the route will not be assigned as the routing peer is offline. As the routing peer should also be on the local lan and is therefore accessible this might be an option for you?

krishne35 commented 1 week ago

that way beyond my skill set xd ill wait from some toggle xd also there is atleast 5 devices that will be using it so this trick might not work seemlessly i guess ill stick to tailscale for now and keep an eye here