[GH-ISSUE #1679] FR: Is it possible to add the ability to automatically change WireGuard ports on a regular basis? Since network carriers in some regions will limit the speed of WireGuard, or even go offline. or even use multiple WireGuard ports? #2799

Open
opened 2026-08-05 00:48:59 -04:00 by saavagebueno · 6 comments
Owner

Originally created by @masx200 on GitHub (Mar 8, 2024).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/1679

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Is it possible to add the ability to automatically change WireGuard ports on a regular basis? Since network carriers in some regions will limit the speed of WireGuard, or even go offline. or even use multiple WireGuard ports?
Describe the solution you'd like
A clear and concise description of what you want to happen.
Is it possible to add the ability to automatically change WireGuard ports on a regular basis? Since network carriers in some regions will limit the speed of WireGuard, or even go offline. or even use multiple WireGuard ports?
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Is it possible to add the ability to automatically change WireGuard ports on a regular basis? Since network carriers in some regions will limit the speed of WireGuard, or even go offline. or even use multiple WireGuard ports?
Additional context
Add any other context or screenshots about the feature request here.
突破运营商 QoS 封锁,WireGuard 真有“一套”!

https://cloud.tencent.com/developer/article/2153908

WireGuard 客户端魔改:对端节点动态更新

https://www.mazhangjing.com/blogs/2023-04-26-wireguard-gw-edition

udp2raw:

https://github.com/wangyu-/udp2raw-tunnel

Phantun:

https://github.com/dndx/phantun

WireGuard for Windows (Great Wall Edition)

https://github.com/corkine/wireguard-windows-great-wall-edition

Originally created by @masx200 on GitHub (Mar 8, 2024). Original GitHub issue: https://github.com/netbirdio/netbird/issues/1679 **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] Is it possible to add the ability to automatically change WireGuard ports on a regular basis? Since network carriers in some regions will limit the speed of WireGuard, or even go offline. or even use multiple WireGuard ports? **Describe the solution you'd like** A clear and concise description of what you want to happen. Is it possible to add the ability to automatically change WireGuard ports on a regular basis? Since network carriers in some regions will limit the speed of WireGuard, or even go offline. or even use multiple WireGuard ports? **Describe alternatives you've considered** A clear and concise description of any alternative solutions or features you've considered. Is it possible to add the ability to automatically change WireGuard ports on a regular basis? Since network carriers in some regions will limit the speed of WireGuard, or even go offline. or even use multiple WireGuard ports? **Additional context** Add any other context or screenshots about the feature request here. 突破运营商 QoS 封锁,WireGuard 真有“一套”! https://cloud.tencent.com/developer/article/2153908 WireGuard 客户端魔改:对端节点动态更新 https://www.mazhangjing.com/blogs/2023-04-26-wireguard-gw-edition udp2raw: https://github.com/wangyu-/udp2raw-tunnel Phantun: https://github.com/dndx/phantun [WireGuard](https://www.wireguard.com/) for Windows (Great Wall Edition) https://github.com/corkine/wireguard-windows-great-wall-edition
saavagebueno added the feature-request label 2026-08-05 00:48:59 -04:00
Author
Owner
<!-- gh-comment-id:1985307362 --> @masx200 commented on GitHub (Mar 8, 2024): https://github.com/coolsnowwolf/lede/issues/4124 https://github.com/wangyu-/udp2raw/issues/332
Author
Owner

@masx200 commented on GitHub (Mar 16, 2024):

If you have multiple Internet lines, then using multiple ports in the private network will be mapped to multiple Internet ports by load balancing, which is also one of the important functions of SD-WAN.

使用多个服务端口也是能够提供负载均衡的能力的,如果拥有多条互联网线路,那么使用多个私网中的端口,就会被负载均衡映射到多个互联网的端口,这也是sd-wan的重要功能之一.

In SD-WAN, load balancing can be carried out through multiple internet broadbands, increasing the bandwidth of the virtual network by using multiple P2P connections.

在sd-wan中,可以通过多条互联网宽带进行负载均衡,提高虚拟网络的带宽,通过使用多条p2p连接.

<!-- gh-comment-id:2001986341 --> @masx200 commented on GitHub (Mar 16, 2024): If you have multiple Internet lines, then using multiple ports in the private network will be mapped to multiple Internet ports by load balancing, which is also one of the important functions of SD-WAN. 使用多个服务端口也是能够提供负载均衡的能力的,如果拥有多条互联网线路,那么使用多个私网中的端口,就会被负载均衡映射到多个互联网的端口,这也是sd-wan的重要功能之一. In SD-WAN, load balancing can be carried out through multiple internet broadbands, increasing the bandwidth of the virtual network by using multiple P2P connections. 在sd-wan中,可以通过多条互联网宽带进行负载均衡,提高虚拟网络的带宽,通过使用多条p2p连接.
Author
Owner

@nazarewk commented on GitHub (Apr 18, 2025):

It is possible to:

  • provide a custom --wireguard-port during netbird up
  • modify WgPort key inside config.json while the NetBird client is down

@masx200 While it is not automated, it could cover your use case?

<!-- gh-comment-id:2815603972 --> @nazarewk commented on GitHub (Apr 18, 2025): It is possible to: - provide a custom `--wireguard-port` during `netbird up` - modify `WgPort` key inside `config.json` while the NetBird client is down @masx200 While it is not automated, it could cover your use case?
Author
Owner

@nazarewk commented on GitHub (Jun 6, 2025):

cross-linking issues related to WireGuard Port selection so they're easier to discover:

<!-- gh-comment-id:2949326209 --> @nazarewk commented on GitHub (Jun 6, 2025): cross-linking issues related to WireGuard Port selection so they're easier to discover: - https://github.com/netbirdio/netbird/issues/2703 - https://github.com/netbirdio/netbird/issues/1378 - https://github.com/netbirdio/netbird/issues/546 - https://github.com/netbirdio/netbird/issues/1679
Author
Owner

@yshah-aromatech commented on GitHub (Nov 30, 2025):

It is possible to:

  • provide a custom --wireguard-port during netbird up
  • modify WgPort key inside config.json while the NetBird client is down

@masx200 While it is not automated, it could cover your use case?

the config.json change does not seem to work, it still defaults to 51820

<!-- gh-comment-id:3592553494 --> @yshah-aromatech commented on GitHub (Nov 30, 2025): > It is possible to: > > * provide a custom `--wireguard-port` during `netbird up` > * modify `WgPort` key inside `config.json` while the NetBird client is down > > [@masx200](https://github.com/masx200) While it is not automated, it could cover your use case? the config.json change does not seem to work, it still defaults to 51820
Author
Owner

@PizzaLovingNerd commented on GitHub (Jun 1, 2026):

It is possible to:

  • provide a custom --wireguard-port during netbird up
  • modify WgPort key inside config.json while the NetBird client is down

@masx200 While it is not automated, it could cover your use case?

We are closing this question with @nazarewk's answer.

You can also use a random port with netbird up --wireguard-port 0 thanks to #4085.

If the config.json change is still not working, please open a new issue. Otherwise, if none of these options cover your use-case, please open a new GitHub Discussion rather than an issue.

Thanks!

<!-- gh-comment-id:4597386379 --> @PizzaLovingNerd commented on GitHub (Jun 1, 2026): > It is possible to: > > * provide a custom `--wireguard-port` during `netbird up` > * modify `WgPort` key inside `config.json` while the NetBird client is down > > [@masx200](https://github.com/masx200) While it is not automated, it could cover your use case? We are closing this question with @nazarewk's answer. You can also use a random port with `netbird up --wireguard-port 0` thanks to #4085. If the config.json change is still not working, please open a new issue. Otherwise, if none of these options cover your use-case, please open a new [GitHub Discussion](https://github.com/netbirdio/netbird/discussions) rather than an issue. Thanks!
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#2799