[GH-ISSUE #4063] Force relay connection not working #8433

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

Originally created by @himekifee on GitHub (Jun 27, 2025).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/4063

Describe the problem

When NB_ICE_FORCE_RELAY_CONN is set to true, the agent still advertises p2p over relay. I suspect the issue is on this line. I had switched the if else, and the result seems to be optimistic. The client properly advertises the relay candidate rather than p2p. However, I'm not sure if it is the desired condition.

Expected behavior

ICE candidate (Local/Remote): srflx/relay instead of ICE candidate (Local/Remote): srflx/srflx when NB_ICE_FORCE_RELAY_CONN is set on the remote peer.

Are you using NetBird Cloud?

No

NetBird version

0.49.0

Is any other VPN software installed?

No

Have you tried these troubleshooting steps?

  • Reviewed client troubleshooting (if applicable)
  • Checked for newer NetBird versions
  • Searched for similar issues on GitHub (including closed ones)
  • Restarted the NetBird client
  • Disabled other VPN software
  • Checked firewall settings
Originally created by @himekifee on GitHub (Jun 27, 2025). Original GitHub issue: https://github.com/netbirdio/netbird/issues/4063 **Describe the problem** When `NB_ICE_FORCE_RELAY_CONN` is set to true, the agent still advertises p2p over relay. I suspect the issue is on this [line](https://github.com/netbirdio/netbird/blob/34ac4e4b5a8ec6d6868623efb3ac602822f9f76d/client/internal/peer/worker_ice.go#L93). I had switched the if else, and the result seems to be optimistic. The client properly advertises the relay candidate rather than p2p. However, I'm not sure if it is the desired condition. **Expected behavior** `ICE candidate (Local/Remote): srflx/relay` instead of `ICE candidate (Local/Remote): srflx/srflx` when `NB_ICE_FORCE_RELAY_CONN` is set on the remote peer. **Are you using NetBird Cloud?** No **NetBird version** `0.49.0` **Is any other VPN software installed?** No **Have you tried these troubleshooting steps?** - [x] Reviewed [client troubleshooting](https://docs.netbird.io/how-to/troubleshooting-client) (if applicable) - [x] Checked for newer NetBird versions - [x] Searched for similar issues on GitHub (including closed ones) - [x] Restarted the NetBird client - [x] Disabled other VPN software - [x] Checked firewall settings
saavagebueno added the triage-needed label 2026-08-05 01:17:56 -04:00
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#8433