[GH-ISSUE #4793] Peers are in relay connection type, instead of p2p #9825

Open
opened 2026-08-05 01:23:37 -04:00 by saavagebueno · 3 comments
Owner

Originally created by @fxandrei on GitHub (Nov 15, 2025).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/4793

So im trying to understand why most of the peers are in relay mode instead of p2p.
My self hosted instance (v0.59.7) has its own public and and its use only for this (vpn).

Now i tried to look and the issue, and read anything i could find, like this:
https://docs.netbird.io/how-to/troubleshooting-client
https://docs.netbird.io/about-netbird/how-netbird-works

But i dont understand yet what to actually check and what to do so that the peers have p2p instead of relay.

Is it possible for 2 peers that are behind a router to be connected in p2p mode without some forwarded ports for the peer involved ?

Is there anything required to be done on the gateway of the clients ?
Or its something that can be done on the selfhosted instance ?

I have generated debug bundles on 2 peers, but there is a lot of stuff there, and im not sure where to actually look.

So do you have any pointers about where to actually look and what is expected for p2p connections to work ?

Originally created by @fxandrei on GitHub (Nov 15, 2025). Original GitHub issue: https://github.com/netbirdio/netbird/issues/4793 So im trying to understand why most of the peers are in relay mode instead of p2p. My self hosted instance (v0.59.7) has its own public and and its use only for this (vpn). Now i tried to look and the issue, and read anything i could find, like this: https://docs.netbird.io/how-to/troubleshooting-client https://docs.netbird.io/about-netbird/how-netbird-works But i dont understand yet what to actually check and what to do so that the peers have p2p instead of relay. Is it possible for 2 peers that are behind a router to be connected in p2p mode without some forwarded ports for the peer involved ? Is there anything required to be done on the gateway of the clients ? Or its something that can be done on the selfhosted instance ? I have generated debug bundles on 2 peers, but there is a lot of stuff there, and im not sure where to actually look. So do you have any pointers about where to actually look and what is expected for p2p connections to work ?
saavagebueno added the triage-needed label 2026-08-05 01:23:37 -04:00
Author
Owner

@fxandrei commented on GitHub (Nov 17, 2025):

Update:

So after some more digging around i found out the the routers/firewall need to have outbound nat with static port enabled.
I did that, and it seems that most of the clients eventually go into p2p connection. But there is a strange thing i saw when using iperf3.
The speed is not the same for both ends.
So if i send from peer1 to peer2 i get 30mb/s.
If i send from peer2 to peer1 i get 10-11 mb/s.
Im not sure why. I may not have anything to do with netbird.
Im still looking into it.

<!-- gh-comment-id:3541371081 --> @fxandrei commented on GitHub (Nov 17, 2025): Update: So after some more digging around i found out the the routers/firewall need to have outbound nat with static port enabled. I did that, and it seems that most of the clients eventually go into p2p connection. But there is a strange thing i saw when using iperf3. The speed is not the same for both ends. So if i send from peer1 to peer2 i get 30mb/s. If i send from peer2 to peer1 i get 10-11 mb/s. Im not sure why. I may not have anything to do with netbird. Im still looking into it.
Author
Owner

@fxandrei commented on GitHub (Nov 18, 2025):

So i think this can be closed, but it sems its working, but it was kind of hard to diagnose this problem.
Is it possible to somehow diagnose this from the management interface ?
Im thinking that maybe, if you want to see why 2 peers are connected in relay mode, you should see why.
What im thinking is this:

  • click on a peer
  • see all the other peers that it can connect
  • see the current connection type
  • have the ability to try to connect directly in p2p mode
  • see what ports its trying to use and if they reach the other side

Some of details can be seen if u run netbird status -d on each peer.

Anyway, what do you think about this kind of problem ?

<!-- gh-comment-id:3547458824 --> @fxandrei commented on GitHub (Nov 18, 2025): So i think this can be closed, but it sems its working, but it was kind of hard to diagnose this problem. Is it possible to somehow diagnose this from the management interface ? Im thinking that maybe, if you want to see why 2 peers are connected in relay mode, you should see why. What im thinking is this: - click on a peer - see all the other peers that it can connect - see the current connection type - have the ability to try to connect directly in p2p mode - see what ports its trying to use and if they reach the other side Some of details can be seen if u run netbird status -d on each peer. Anyway, what do you think about this kind of problem ?
Author
Owner

@1nerdyguy commented on GitHub (Nov 25, 2025):

What you're describing is exactly what the clients and such are already doing, just in the backend.

The correct spot to look for these issues would be in the NAT devices (if available) on the client networks, as they're the ones causing the problem.

<!-- gh-comment-id:3575559203 --> @1nerdyguy commented on GitHub (Nov 25, 2025): What you're describing is exactly what the clients and such are already doing, just in the backend. The correct spot to look for these issues would be in the NAT devices (if available) on the client networks, as they're the ones causing the problem.
Sign in to join this conversation.
No Label triage-needed
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#9825