Connection to peers always relayed if the peer's IPs are included as Networks resources #1934

Open
opened 2025-11-20 06:09:40 -05:00 by saavagebueno · 0 comments
Owner

Originally created by @Pulseeey on GitHub (Jun 4, 2025).

Describe the problem

When trying to use the Networks feature, I'm unable to connect to peers over P2P if the peer's IP address is part of a larger subnet that's added as a Networks resource, where that peer is also a Routing Peer.

For example, if a peer's IP public address is 198.51.103.2.
If I add 198.51.100.0/23 as a Networks resource with that peer as one of the Routing Peers, the connection will be relayed.
If I don't use Networks and try with the peer as an exit node instead, it connects over P2P.

To Reproduce

Steps to reproduce the behaviour:

  1. Add a peer that has an IP that's part of a larger block
  2. Add that larger block as a Networks resource with that peer as a Routing Peer
  3. Connect, and the connection will be relayed instead of P2P
  4. Remove that Networks resource and it will then connect over P2P just fine

Expected behaviour

I figured it should still be able to connect directly to peers even if their IP addresses are part of a larger subnet added as a Networks resource, similar to when the peer is an exit node as that would also cover its own subnet/IP with the 0.0.0.0/0 route.

Are you using NetBird Cloud?

No, self-hosted

NetBird version

v0.45.3

Is any other VPN software installed?

No

To help us resolve the problem, please attach the following anonymized status output

netbird.txt

Create and upload a debug bundle, and share the returned file key:

Upload file key:
77e57e589318440f8a784a7ca8dffe25be0ca5219c2d0837d26f906eedb94048/c502eb79-d224-4a5f-a1b2-334ee4052b94

Originally created by @Pulseeey on GitHub (Jun 4, 2025). **Describe the problem** When trying to use the Networks feature, I'm unable to connect to peers over P2P if the peer's IP address is part of a larger subnet that's added as a Networks resource, where that peer is also a Routing Peer. For example, if a peer's IP public address is 198.51.103.2. If I add 198.51.100.0/23 as a Networks resource with that peer as one of the Routing Peers, the connection will be relayed. If I don't use Networks and try with the peer as an exit node instead, it connects over P2P. **To Reproduce** Steps to reproduce the behaviour: 1. Add a peer that has an IP that's part of a larger block 2. Add that larger block as a Networks resource with that peer as a Routing Peer 3. Connect, and the connection will be relayed instead of P2P 4. Remove that Networks resource and it will then connect over P2P just fine **Expected behaviour** I figured it should still be able to connect directly to peers even if their IP addresses are part of a larger subnet added as a Networks resource, similar to when the peer is an exit node as that would also cover its own subnet/IP with the 0.0.0.0/0 route. **Are you using NetBird Cloud?** No, self-hosted **NetBird version** v0.45.3 **Is any other VPN software installed?** No To help us resolve the problem, please attach the following anonymized status output [netbird.txt](https://github.com/user-attachments/files/20594820/netbird.txt) Create and upload a debug bundle, and share the returned file key: Upload file key: 77e57e589318440f8a784a7ca8dffe25be0ca5219c2d0837d26f906eedb94048/c502eb79-d224-4a5f-a1b2-334ee4052b94
saavagebueno added the triage-needed label 2025-11-20 06:09:40 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#1934