[GH-ISSUE #3430] [Feature request] Improve speed when one peer is behind NAT #7317

Open
opened 2026-08-05 01:12:28 -04:00 by saavagebueno · 0 comments
Owner

Originally created by @hotfur on GitHub (Mar 4, 2025).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/3430

Is your feature request related to a problem? Please describe.
When both peer have public IP addresses, they obviously can directly connect to each other and the speed would be very high. However, when one of the peer (let's call it Public peer) have public IP address with open ports but the other (let's call this one NATed peer) do not because it is behind a NAT without access to port forwarding for example, then NetBird fallback into relay mode. This cause an unnecessary load on NetBird relay servers and an abysmal speed (average 7Mbps) for both peers.

Describe the solution you'd like
Relay servers should be used only when both peers do not have access to port forwarding/DMZ settings. When there is a Public peer, the NATed peer should connect to the open ports and set up PersistentKeepalive in Wireguard config to traverse NAT. The public peer would then have the Endpoint field in Wireguard config wildcarded, so as to allow the NATed peer more flexibility in making the connection.

Doing this would make the speed go up to the limit of the connection, for me it is nearly 300Mbps.

Describe alternatives you've considered
It is unlikely that there is any other alternatives.

Additional context
Nope.

Originally created by @hotfur on GitHub (Mar 4, 2025). Original GitHub issue: https://github.com/netbirdio/netbird/issues/3430 **Is your feature request related to a problem? Please describe.** When both peer have public IP addresses, they obviously can directly connect to each other and the speed would be very high. However, when one of the peer (let's call it Public peer) have public IP address with open ports but the other (let's call this one NATed peer) do not because it is behind a NAT without access to port forwarding for example, then NetBird fallback into relay mode. This cause an unnecessary load on NetBird relay servers and an abysmal speed (average 7Mbps) for both peers. **Describe the solution you'd like** Relay servers should be used only when both peers do not have access to port forwarding/DMZ settings. When there is a Public peer, the NATed peer should connect to the open ports and set up PersistentKeepalive in Wireguard config to traverse NAT. The public peer would then have the Endpoint field in Wireguard config wildcarded, so as to allow the NATed peer more flexibility in making the connection. Doing this would make the speed go up to the limit of the connection, for me it is nearly 300Mbps. **Describe alternatives you've considered** It is unlikely that there is any other alternatives. **Additional context** Nope.
saavagebueno added the feature-request label 2026-08-05 01:12:28 -04:00
Sign in to join this conversation.
No Label feature-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#7317