Ability to specify port used by peer #1218

Closed
opened 2025-11-20 05:26:11 -05:00 by saavagebueno · 1 comment
Owner

Originally created by @t3cneo on GitHub (Sep 5, 2024).

Is your feature request related to a problem? Please describe.
When using netbird behind a gateway which also have a wireguard server set up on default 51820 port, netbird peer connexions are difficult if possible at all.

At home I have my router set up as a Wireguard server (not netbird, plain wireguard) to be able to remote in or remote exit from home.
I noticed I randomly couldn't reach some netbird peers on my laptop when at home and the command netbird status -d helped me remember peers are trying to handshake my pubic_ip:51820 which probably makes my gateway confused about it is supposed to handle the handshake or pass it to my laptop.
I just changed my gateway's wireguard server to listen to 51821 and I can now quickly connect to every availble peers.

I happened to visit a company the other day that probably also have a wireguard server listening on the default port 51820, I couldn't reach any netbird peers from this location and obviously could not ask those guys to change their wireguard setup...

Describe the solution you'd like
It'd be great if we could specify the port used by a peer from the UI, or have some kind of port range that a peer would try after some kind of connect timeout.

Describe alternatives you've considered
Changing the gateway wireguard server listening port is a workaround but not always under my will...

Originally created by @t3cneo on GitHub (Sep 5, 2024). **Is your feature request related to a problem? Please describe.** When using netbird behind a gateway which also have a wireguard server set up on default 51820 port, netbird peer connexions are difficult if possible at all. At home I have my router set up as a Wireguard server (not netbird, plain wireguard) to be able to remote in or remote exit from home. I noticed I randomly couldn't reach some netbird peers on my laptop when at home and the command `netbird status -d` helped me remember peers are trying to handshake my pubic_ip:51820 which probably makes my gateway confused about it is supposed to handle the handshake or pass it to my laptop. I just changed my gateway's wireguard server to listen to 51821 and I can now quickly connect to every availble peers. I happened to visit a company the other day that probably also have a wireguard server listening on the default port 51820, I couldn't reach any netbird peers from this location and obviously could not ask those guys to change their wireguard setup... **Describe the solution you'd like** It'd be great if we could specify the port used by a peer from the UI, or have some kind of port range that a peer would try after some kind of connect timeout. **Describe alternatives you've considered** Changing the gateway wireguard server listening port is a workaround but not always under my will...
saavagebueno added the feature-request label 2025-11-20 05:26:11 -05:00
Author
Owner

@micmejia commented on GitHub (Sep 12, 2024):

The netbird cli has a wireguard-port, example:

netbird down && netbird up --allow-server-ssh --wireguard-port 51821
@micmejia commented on GitHub (Sep 12, 2024): The netbird cli has a `wireguard-port`, example: ``` netbird down && netbird up --allow-server-ssh --wireguard-port 51821 ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#1218