[GH-ISSUE #1607] An attempt was made to access a socket in a way forbidden by its access permissions in Windows #2766

Closed
opened 2026-08-05 00:48:49 -04:00 by saavagebueno · 21 comments
Owner

Originally created by @wizpresso-steve-cy-fan on GitHub (Feb 21, 2024).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/1607

Describe the problem

2024-02-22T11:30:15+08:00 INFO client/internal/login.go:130: peer has been successfully registered on Management Service
2024-02-22T11:30:15+08:00 INFO client/internal/connect.go:95: starting NetBird client version 0.25.8
2024-02-22T11:30:17+08:00 ERRO client/internal/engine.go:279: failed to pull up wgInterface [wt0]: listen udp4 :51820: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
2024-02-22T11:30:17+08:00 ERRO client/internal/connect.go:234: error while starting Netbird Connection Engine: listen udp4 :51820: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
2024-02-22T11:30:21+08:00 ERRO client/internal/engine.go:279: failed to pull up wgInterface [wt0]: listen udp4 :51820: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
2024-02-22T11:30:21+08:00 ERRO client/internal/connect.go:234: error while starting Netbird Connection Engine: listen udp4 :51820: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

To Reproduce

Steps to reproduce the behavior:

  1. Download the latest Windows Client
  2. Install
  3. Expect to connect, but actual behavior is connection stuck.

Are you using NetBird Cloud?

Yes

NetBird version

0.25.8

NetBird status -d output:

Error: status failed: listen udp4 :51820: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
Originally created by @wizpresso-steve-cy-fan on GitHub (Feb 21, 2024). Original GitHub issue: https://github.com/netbirdio/netbird/issues/1607 **Describe the problem** ``` 2024-02-22T11:30:15+08:00 INFO client/internal/login.go:130: peer has been successfully registered on Management Service 2024-02-22T11:30:15+08:00 INFO client/internal/connect.go:95: starting NetBird client version 0.25.8 2024-02-22T11:30:17+08:00 ERRO client/internal/engine.go:279: failed to pull up wgInterface [wt0]: listen udp4 :51820: bind: An attempt was made to access a socket in a way forbidden by its access permissions. 2024-02-22T11:30:17+08:00 ERRO client/internal/connect.go:234: error while starting Netbird Connection Engine: listen udp4 :51820: bind: An attempt was made to access a socket in a way forbidden by its access permissions. 2024-02-22T11:30:21+08:00 ERRO client/internal/engine.go:279: failed to pull up wgInterface [wt0]: listen udp4 :51820: bind: An attempt was made to access a socket in a way forbidden by its access permissions. 2024-02-22T11:30:21+08:00 ERRO client/internal/connect.go:234: error while starting Netbird Connection Engine: listen udp4 :51820: bind: An attempt was made to access a socket in a way forbidden by its access permissions. ``` **To Reproduce** Steps to reproduce the behavior: 1. Download the latest Windows Client 2. Install 3. Expect to connect, but actual behavior is connection stuck. **Are you using NetBird Cloud?** Yes **NetBird version** 0.25.8 **NetBird status -d output:** ``` Error: status failed: listen udp4 :51820: bind: An attempt was made to access a socket in a way forbidden by its access permissions. ```
saavagebueno added the clientsystem-compatibility-issue labels 2026-08-05 00:48:49 -04:00
Author
Owner

@wizpresso-steve-cy-fan commented on GitHub (Feb 21, 2024):

Tried to stop the service then do foreground debug:

2024-02-22T11:39:00+08:00 ERRO client/internal/connect.go:187: error while starting Netbird Connection Engine: open \\.\pipe\ProtectedPrefix\Administrators\WireGuard\wt0: This security ID may not be assigned as the owner of this object.
<!-- gh-comment-id:1958598283 --> @wizpresso-steve-cy-fan commented on GitHub (Feb 21, 2024): Tried to stop the service then do foreground debug: ``` 2024-02-22T11:39:00+08:00 ERRO client/internal/connect.go:187: error while starting Netbird Connection Engine: open \\.\pipe\ProtectedPrefix\Administrators\WireGuard\wt0: This security ID may not be assigned as the owner of this object. ```
Author
Owner

@mlsmaycon commented on GitHub (Feb 22, 2024):

@wizpresso-steve-cy-fan to run the agent in the foreground on Windows, you can follow the guide documented here: https://docs.netbird.io/how-to/troubleshooting-client#windows

<!-- gh-comment-id:1958892665 --> @mlsmaycon commented on GitHub (Feb 22, 2024): @wizpresso-steve-cy-fan to run the agent in the foreground on Windows, you can follow the guide documented here: https://docs.netbird.io/how-to/troubleshooting-client#windows
Author
Owner

@silencer404 commented on GitHub (Mar 14, 2024):

I also encountered this problem. I collected some logs according to what you said, but there seems to be no more information.
FYI,everything seems well until i turn on the hyper-v switch in system and use hyper-v recently, this creates some adapter named vEthernet(xxxxxx),i do not know this is matter or not.

OS version:
win10 22H2

Netbird version:
0.26.3

2024-03-15T04:01:13+08:00 DEBG client/internal/login.go:93: connecting to the Management service https://example.domain:443
2024-03-15T04:01:13+08:00 DEBG client/internal/login.go:63: connected to the Management service https://example.domain:443
2024-03-15T04:01:16+08:00 DEBG client/internal/login.go:93: connecting to the Management service https://example.domain:443
2024-03-15T04:01:16+08:00 DEBG client/internal/login.go:63: connected to the Management service https://example.domain:443
2024-03-15T04:01:18+08:00 INFO client/internal/connect.go:96: starting NetBird client version 0.26.3
2024-03-15T04:01:18+08:00 DEBG client/internal/connect.go:157: connecting to the Management service example.domain:443
2024-03-15T04:01:19+08:00 DEBG client/internal/connect.go:165: connected to the Management service example.domain:443
2024-03-15T04:01:21+08:00 DEBG signal/client/grpc.go:90: connected to Signal Service: example.domain:443
2024/03/15 04:01:22 Using existing driver 0.14
2024/03/15 04:01:22 Creating adapter
2024-03-15T04:01:23+08:00 DEBG iface/tun_windows.go:153: adding address 100.65.237.7 to interface: wt0
2024-03-15T04:01:23+08:00 DEBG iface/wg_configurer_usp.go:35: adding Wireguard private key
2024/03/15 04:01:23 Removed orphaned adapter "wt0"
2024-03-15T04:01:36+08:00 ERRO client/internal/engine.go:287: failed to pull up wgInterface [wt0]: listen udp4 :51820: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
2024-03-15T04:01:36+08:00 DEBG client/internal/engine.go:1104: removing Netbird interface wt0
2024-03-15T04:01:38+08:00 ERRO client/internal/connect.go:235: error while starting Netbird Connection Engine: listen udp4 :51820: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
2024-03-15T04:01:38+08:00 DEBG client/internal/connect.go:157: connecting to the Management service example.domain:443
2024-03-15T04:01:39+08:00 DEBG client/internal/connect.go:165: connected to the Management service example.domain:443
2024-03-15T04:01:41+08:00 DEBG signal/client/grpc.go:90: connected to Signal Service: example.domain:443
2024/03/15 04:01:43 Using existing driver 0.14
2024/03/15 04:01:43 Creating adapter
2024-03-15T04:01:43+08:00 DEBG iface/tun_windows.go:153: adding address 100.65.237.7 to interface: wt0
2024-03-15T04:01:43+08:00 DEBG iface/wg_configurer_usp.go:35: adding Wireguard private key
2024-03-15T04:01:45+08:00 ERRO client/internal/engine.go:287: failed to pull up wgInterface [wt0]: listen udp4 :51820: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
2024-03-15T04:01:45+08:00 DEBG client/internal/engine.go:1104: removing Netbird interface wt0
2024-03-15T04:01:45+08:00 ERRO client/internal/connect.go:235: error while starting Netbird Connection Engine: listen udp4 :51820: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
2024-03-15T04:01:46+08:00 DEBG client/internal/connect.go:157: connecting to the Management service example.domain:443
2024-03-15T04:01:47+08:00 DEBG client/internal/connect.go:165: connected to the Management service example.domain:443
2024-03-15T04:01:49+08:00 DEBG signal/client/grpc.go:90: connected to Signal Service: example.domain:443
<!-- gh-comment-id:1998377742 --> @silencer404 commented on GitHub (Mar 14, 2024): I also encountered this problem. I collected some logs according to what you said, but there seems to be no more information. FYI,everything seems well until i turn on the hyper-v switch in system and use hyper-v recently, this creates some adapter named vEthernet(xxxxxx),i do not know this is matter or not. OS version: win10 22H2 Netbird version: 0.26.3 ``` 2024-03-15T04:01:13+08:00 DEBG client/internal/login.go:93: connecting to the Management service https://example.domain:443 2024-03-15T04:01:13+08:00 DEBG client/internal/login.go:63: connected to the Management service https://example.domain:443 2024-03-15T04:01:16+08:00 DEBG client/internal/login.go:93: connecting to the Management service https://example.domain:443 2024-03-15T04:01:16+08:00 DEBG client/internal/login.go:63: connected to the Management service https://example.domain:443 2024-03-15T04:01:18+08:00 INFO client/internal/connect.go:96: starting NetBird client version 0.26.3 2024-03-15T04:01:18+08:00 DEBG client/internal/connect.go:157: connecting to the Management service example.domain:443 2024-03-15T04:01:19+08:00 DEBG client/internal/connect.go:165: connected to the Management service example.domain:443 2024-03-15T04:01:21+08:00 DEBG signal/client/grpc.go:90: connected to Signal Service: example.domain:443 2024/03/15 04:01:22 Using existing driver 0.14 2024/03/15 04:01:22 Creating adapter 2024-03-15T04:01:23+08:00 DEBG iface/tun_windows.go:153: adding address 100.65.237.7 to interface: wt0 2024-03-15T04:01:23+08:00 DEBG iface/wg_configurer_usp.go:35: adding Wireguard private key 2024/03/15 04:01:23 Removed orphaned adapter "wt0" 2024-03-15T04:01:36+08:00 ERRO client/internal/engine.go:287: failed to pull up wgInterface [wt0]: listen udp4 :51820: bind: An attempt was made to access a socket in a way forbidden by its access permissions. 2024-03-15T04:01:36+08:00 DEBG client/internal/engine.go:1104: removing Netbird interface wt0 2024-03-15T04:01:38+08:00 ERRO client/internal/connect.go:235: error while starting Netbird Connection Engine: listen udp4 :51820: bind: An attempt was made to access a socket in a way forbidden by its access permissions. 2024-03-15T04:01:38+08:00 DEBG client/internal/connect.go:157: connecting to the Management service example.domain:443 2024-03-15T04:01:39+08:00 DEBG client/internal/connect.go:165: connected to the Management service example.domain:443 2024-03-15T04:01:41+08:00 DEBG signal/client/grpc.go:90: connected to Signal Service: example.domain:443 2024/03/15 04:01:43 Using existing driver 0.14 2024/03/15 04:01:43 Creating adapter 2024-03-15T04:01:43+08:00 DEBG iface/tun_windows.go:153: adding address 100.65.237.7 to interface: wt0 2024-03-15T04:01:43+08:00 DEBG iface/wg_configurer_usp.go:35: adding Wireguard private key 2024-03-15T04:01:45+08:00 ERRO client/internal/engine.go:287: failed to pull up wgInterface [wt0]: listen udp4 :51820: bind: An attempt was made to access a socket in a way forbidden by its access permissions. 2024-03-15T04:01:45+08:00 DEBG client/internal/engine.go:1104: removing Netbird interface wt0 2024-03-15T04:01:45+08:00 ERRO client/internal/connect.go:235: error while starting Netbird Connection Engine: listen udp4 :51820: bind: An attempt was made to access a socket in a way forbidden by its access permissions. 2024-03-15T04:01:46+08:00 DEBG client/internal/connect.go:157: connecting to the Management service example.domain:443 2024-03-15T04:01:47+08:00 DEBG client/internal/connect.go:165: connected to the Management service example.domain:443 2024-03-15T04:01:49+08:00 DEBG signal/client/grpc.go:90: connected to Signal Service: example.domain:443 ```
Author
Owner

@mlsmaycon commented on GitHub (Mar 14, 2024):

It might be related to: https://superuser.com/a/1610009

Can you check the output of:

netsh interface ipv4 show excludedportrange protocol=udp
<!-- gh-comment-id:1998411222 --> @mlsmaycon commented on GitHub (Mar 14, 2024): It might be related to: https://superuser.com/a/1610009 Can you check the output of: ```shell netsh interface ipv4 show excludedportrange protocol=udp ```
Author
Owner

@silencer404 commented on GitHub (Mar 15, 2024):

Thank you for your help,I solve this bug by reboot my PC one more time. I try to reproduce the problem and succeed,steps list as follows:
1.Create or delete virtual adapter.Netbird works well now.
2.Reboot PC and the issue comes.Run netsh interface ipv4 show excludedportrange protocol=udp ,logs are as follows.
3.Reboot PC one more time,the issue solved.

Protocol tcp Port Exclusion Ranges

Start Port    End Port
----------    --------
[...]
    51675       51774
    51775       51874   #include port 51820
    51875       51974
    51975       52074
[...]
<!-- gh-comment-id:1998951731 --> @silencer404 commented on GitHub (Mar 15, 2024): Thank you for your help,I solve this bug by reboot my PC one more time. I try to reproduce the problem and succeed,steps list as follows: 1.Create or delete virtual adapter.Netbird works well now. 2.Reboot PC and the issue comes.Run `netsh interface ipv4 show excludedportrange protocol=udp` ,logs are as follows. 3.Reboot PC one more time,the issue solved. ``` Protocol tcp Port Exclusion Ranges Start Port End Port ---------- -------- [...] 51675 51774 51775 51874 #include port 51820 51875 51974 51975 52074 [...] ```
Author
Owner

@silencer404 commented on GitHub (Mar 15, 2024):

In addition,net stop winnat can also solve this issue.

<!-- gh-comment-id:1998960424 --> @silencer404 commented on GitHub (Mar 15, 2024): In addition,`net stop winnat` can also solve this issue.
Author
Owner

@wizpresso-steve-cy-fan commented on GitHub (Mar 15, 2024):

Thank you for your help,I solve this bug by reboot my PC one more time. I try to reproduce the problem and succeed,steps list as follows: 1.Create or delete virtual adapter.Netbird works well now. 2.Reboot PC and the issue comes.Run netsh interface ipv4 show excludedportrange protocol=udp ,logs are as follows. 3.Reboot PC one more time,the issue solved.

Protocol tcp Port Exclusion Ranges

Start Port    End Port
----------    --------
[...]
    51675       51774
    51775       51874   #include port 51820
    51875       51974
    51975       52074
[...]

Yes. I also noticed that if I reboot the PC to the initial state without any WG tunnels, it would work, but subsequent reconnections would fail (so you can't do any inadvertent disconnection like roaming)

<!-- gh-comment-id:1999082538 --> @wizpresso-steve-cy-fan commented on GitHub (Mar 15, 2024): > Thank you for your help,I solve this bug by reboot my PC one more time. I try to reproduce the problem and succeed,steps list as follows: 1.Create or delete virtual adapter.Netbird works well now. 2.Reboot PC and the issue comes.Run `netsh interface ipv4 show excludedportrange protocol=udp` ,logs are as follows. 3.Reboot PC one more time,the issue solved. > > ``` > Protocol tcp Port Exclusion Ranges > > Start Port End Port > ---------- -------- > [...] > 51675 51774 > 51775 51874 #include port 51820 > 51875 51974 > 51975 52074 > [...] > ``` Yes. I also noticed that if I reboot the PC to the initial state without any WG tunnels, it would work, but subsequent reconnections would fail (so you can't do any inadvertent disconnection like roaming)
Author
Owner

@W1BTR commented on GitHub (Jun 13, 2024):

Also having this issue, Windows 10. Selhosted.

<!-- gh-comment-id:2166461207 --> @W1BTR commented on GitHub (Jun 13, 2024): Also having this issue, Windows 10. Selhosted.
Author
Owner

@timnis commented on GitHub (Jul 29, 2024):

Same issue with Windows 11 and netbird 0.28.6. Selfhosted.

<!-- gh-comment-id:2255582418 --> @timnis commented on GitHub (Jul 29, 2024): Same issue with Windows 11 and netbird 0.28.6. Selfhosted.
Author
Owner

@pascal456 commented on GitHub (Sep 6, 2024):

  • same issue when roaming.
  • win 10.
  • not selfhosted

also: net stop winnat helped 👍

<!-- gh-comment-id:2334821355 --> @pascal456 commented on GitHub (Sep 6, 2024): - same issue when roaming. - win 10. - **not** selfhosted also: `net stop winnat` helped 👍
Author
Owner

@windowshopr commented on GitHub (Nov 8, 2024):

@pascal456 net stop winnat was the only thing that helped me after hours of searching, thank you! Hope your comment gets more likes for us windows users!

<!-- gh-comment-id:2466032650 --> @windowshopr commented on GitHub (Nov 8, 2024): @pascal456 `net stop winnat` was the only thing that helped me after hours of searching, thank you! Hope your comment gets more likes for us windows users!
Author
Owner

@kapgit commented on GitHub (Nov 25, 2024):

Same issue (see environment below).

In my case, port localhost:53000/udp could not be reached during authentication.

Disabling the winnat service in Windows seems to do the trick (thanks!), but what are the side effects? Surely, something on the system must depend on it? (Hyper-V? WSL? Docker?)

The following commands also fix my problem, but leave the winnat service on.

In a PowerShell console as Administrator:

net stop winnat

netsh int ipv4 add excludedportrange protocol=udp startport=51820 numberofports=1

netsh int ipv4 add excludedportrange protocol=udp startport=53000 numberofports=1

net start winnat

Would it make sense to make it part of the Netbird client (installation) executable?

Source: https://blog.deanosim.net/windows-10-winnat-and-why-your-programs-cant-listen-on-certain-ports/ ("Windows 10/11 WINNAT and why your programs can't listen on certain ports. [2024 Update]")

Environment:

  • Netbird Server:
    • Self-hosted Netbird (deployed using Netbird's convenience script in an LXC container + Debian 12)
  • Netbird client/Peer:
    • Windows 10 Pro 22H2
    • Netbird GUI v0.33.0
    • Netbird Daemon v0.33.0
<!-- gh-comment-id:2498846887 --> @kapgit commented on GitHub (Nov 25, 2024): Same issue (see environment below). In my case, port localhost:53000/udp could not be reached during authentication. Disabling the `winnat` service in Windows seems to do the trick (thanks!), but what are the side effects? Surely, something on the system must depend on it? (Hyper-V? WSL? Docker?) The following commands also fix my problem, but leave the `winnat` service on. In a PowerShell console as Administrator: ```powershell net stop winnat netsh int ipv4 add excludedportrange protocol=udp startport=51820 numberofports=1 netsh int ipv4 add excludedportrange protocol=udp startport=53000 numberofports=1 net start winnat ``` Would it make sense to make it part of the Netbird client (installation) executable? Source: https://blog.deanosim.net/windows-10-winnat-and-why-your-programs-cant-listen-on-certain-ports/ ("Windows 10/11 WINNAT and why your programs can't listen on certain ports. [2024 Update]") Environment: - Netbird Server: - Self-hosted Netbird (deployed using Netbird's convenience script in an LXC container + Debian 12) - Netbird client/Peer: - Windows 10 Pro 22H2 - Netbird GUI v0.33.0 - Netbird Daemon v0.33.0
Author
Owner

@jakob1379 commented on GitHub (Jan 6, 2025):

For me, the age-old suggestion "have you tried turning it off and on again" solved it i.e. restart the computer...

<!-- gh-comment-id:2573119343 --> @jakob1379 commented on GitHub (Jan 6, 2025): For me, the age-old suggestion "have you tried turning it off and on again" solved it i.e. restart the computer...
Author
Owner

@styris-ame commented on GitHub (Jan 12, 2025):

Similar issue on my friend's Windows PC. My machine works fine but he gets a netbird error window upon connecting that says ... listen tcp :53000 bind: An attempt was made to access a socket in a way forbidden by its access permissions.

<!-- gh-comment-id:2585955630 --> @styris-ame commented on GitHub (Jan 12, 2025): Similar issue on my friend's Windows PC. My machine works fine but he gets a netbird error window upon connecting that says `... listen tcp :53000 bind: An attempt was made to access a socket in a way forbidden by its access permissions.`
Author
Owner

@jonasclaes commented on GitHub (Apr 7, 2025):

Same issue (see environment below).

In my case, port localhost:53000/udp could not be reached during authentication.

Disabling the winnat service in Windows seems to do the trick (thanks!), but what are the side effects? Surely, something on the system must depend on it? (Hyper-V? WSL? Docker?)

The following commands also fix my problem, but leave the winnat service on.

In a PowerShell console as Administrator:

net stop winnat

netsh int ipv4 add excludedportrange protocol=udp startport=51820 numberofports=1

netsh int ipv4 add excludedportrange protocol=udp startport=53000 numberofports=1

net start winnat

Would it make sense to make it part of the Netbird client (installation) executable?

Source: https://blog.deanosim.net/windows-10-winnat-and-why-your-programs-cant-listen-on-certain-ports/ ("Windows 10/11 WINNAT and why your programs can't listen on certain ports. [2024 Update]")

Environment:

* Netbird Server:
  
  * Self-hosted Netbird (deployed using Netbird's convenience script in an LXC container + Debian 12)

* Netbird client/Peer:
  
  * Windows 10 Pro 22H2
  * Netbird GUI v0.33.0
  * Netbird Daemon v0.33.0

I think just changing the default port from 53000 to something under 49152 would solve this issue without needing the winnat workaround right?

<!-- gh-comment-id:2782655402 --> @jonasclaes commented on GitHub (Apr 7, 2025): > Same issue (see environment below). > > In my case, port localhost:53000/udp could not be reached during authentication. > > Disabling the `winnat` service in Windows seems to do the trick (thanks!), but what are the side effects? Surely, something on the system must depend on it? (Hyper-V? WSL? Docker?) > > The following commands also fix my problem, but leave the `winnat` service on. > > In a PowerShell console as Administrator: > > net stop winnat > > netsh int ipv4 add excludedportrange protocol=udp startport=51820 numberofports=1 > > netsh int ipv4 add excludedportrange protocol=udp startport=53000 numberofports=1 > > net start winnat > > Would it make sense to make it part of the Netbird client (installation) executable? > > Source: https://blog.deanosim.net/windows-10-winnat-and-why-your-programs-cant-listen-on-certain-ports/ ("Windows 10/11 WINNAT and why your programs can't listen on certain ports. [2024 Update]") > > Environment: > > * Netbird Server: > > * Self-hosted Netbird (deployed using Netbird's convenience script in an LXC container + Debian 12) > > * Netbird client/Peer: > > * Windows 10 Pro 22H2 > * Netbird GUI v0.33.0 > * Netbird Daemon v0.33.0 I think just changing the default port from 53000 to something under 49152 would solve this issue without needing the `winnat` workaround right?
Author
Owner

@jakob1379 commented on GitHub (Aug 22, 2025):

I haven't seen this on any of me devices for a long time - anyone still noticing otherwise I believe this should be closed.

<!-- gh-comment-id:3214689166 --> @jakob1379 commented on GitHub (Aug 22, 2025): I haven't seen this on any of me devices for a long time - anyone still noticing otherwise I believe this should be closed.
Author
Owner

@lmarschall commented on GitHub (Aug 23, 2025):

Me neither, Windows has been a pretty stable experience in the recent months, and we've been using the netbird client pretty heavily. Thanks for the awesome work 👍

<!-- gh-comment-id:3216556986 --> @lmarschall commented on GitHub (Aug 23, 2025): Me neither, Windows has been a pretty stable experience in the recent months, and we've been using the netbird client pretty heavily. Thanks for the awesome work 👍
Author
Owner

@JonathanManass commented on GitHub (Aug 25, 2025):

While the proposed solutions of adding excludedportrange to port 53000 works perfectly, without running that command the issue still persists, I just got it with the latest version (v0.55.1)

<!-- gh-comment-id:3219270056 --> @JonathanManass commented on GitHub (Aug 25, 2025): While the proposed solutions of adding excludedportrange to port 53000 works perfectly, without running that command the issue still persists, I just got it with the latest version (v0.55.1)
Author
Owner

@rqi14 commented on GitHub (Sep 1, 2025):

It used to be ok for me. but recently I'm getting this error too.

<!-- gh-comment-id:3243653577 --> @rqi14 commented on GitHub (Sep 1, 2025): It used to be ok for me. but recently I'm getting this error too.
Author
Owner

@rittycat commented on GitHub (Nov 6, 2025):

This is still a problem. I think the core issue is the use of 53000 by netbird to begin with. See this page:

- 49152–65535 suggested by RFC 6335 and the Internet Assigned Numbers Authority (IANA) for dynamic or private ports.
- 32768–60999 used by many Linux kernels.

The key point of these types of ports is that they are short lived and an application is meant to use the next/lowest available port. As netbird sets a static port, it doesn't follow these rules.

I understand that due to the way netbird integrates with various OIDC providers, a static port for localhost is necessary, and that since it's only used for that initial auth, it is temporary, however could I suggest the default being changed to something that isn't as likely to be used by operating systems for any application in need of an ephemeral port?

Either that, or Netbird's installation/uninstallation process should ensure that exclusions are properly added and removed.

<!-- gh-comment-id:3496516252 --> @rittycat commented on GitHub (Nov 6, 2025): This is still a problem. I think the core issue is the use of 53000 by netbird to begin with. See this page: - https://en.wikipedia.org/wiki/Ephemeral_port ``` - 49152–65535 suggested by RFC 6335 and the Internet Assigned Numbers Authority (IANA) for dynamic or private ports. - 32768–60999 used by many Linux kernels. ``` The key point of these types of ports is that they are short lived and an application is meant to use the next/lowest available port. As netbird sets a static port, it doesn't follow these rules. I understand that due to the way netbird integrates with various OIDC providers, a static port for localhost is necessary, and that since it's only used for that initial auth, it is temporary, however could I suggest the default being changed to something that isn't as likely to be used by operating systems for any application in need of an ephemeral port? Either that, or Netbird's installation/uninstallation process should ensure that exclusions are properly added and removed.
Author
Owner

@PizzaLovingNerd commented on GitHub (May 30, 2026):

Closing as resolved. NetBird now selects another available WireGuard port when 51820 is unavailable and avoids Windows-reserved ports when selecting the PKCE callback URL. The embedded IdP configuration also provides 54000 as a fallback callback port. If this is still happening on the latest version of NetBird, please open a fresh issue with a debug bundle. Cheers!

<!-- gh-comment-id:4585509355 --> @PizzaLovingNerd commented on GitHub (May 30, 2026): Closing as resolved. NetBird now selects another available WireGuard port when `51820` is unavailable and avoids Windows-reserved ports when selecting the PKCE callback URL. The embedded IdP configuration also provides `54000` as a fallback callback port. If this is still happening on the latest version of NetBird, please open a fresh issue with a debug bundle. Cheers!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#2766