Let peer choose DNS port #240

Closed
opened 2025-11-20 05:08:28 -05:00 by saavagebueno · 5 comments
Owner

Originally created by @e-renna on GitHub (Nov 26, 2022).

First of all, thank you for the recent update which brought the DNS feature!
I was wondering if it would be possible to let the user choose if the local resolver on each peer should bind on port 53 or 5053.
This could be a manual setting that would override the automatic check, that select port 5053 if port 53 is already in use.

The aim is to avoid problems with services that start after netbird and need to bind on port 53. In this case, netbird would bind on the port as at the time of check is free, but the later starting service would then fail to start because of it.

Originally created by @e-renna on GitHub (Nov 26, 2022). First of all, thank you for the recent update which brought the DNS feature! I was wondering if it would be possible to let the user choose if the local resolver on each peer should bind on port 53 or 5053. This could be a manual setting that would override the automatic check, that select port 5053 if port 53 is already in use. The aim is to avoid problems with services that start after netbird and need to bind on port 53. In this case, netbird would bind on the port as at the time of check is free, but the later starting service would then fail to start because of it.
Author
Owner

@mlsmaycon commented on GitHub (Nov 26, 2022):

Thanks @e-renna I will add this option in the next release

@mlsmaycon commented on GitHub (Nov 26, 2022): Thanks @e-renna I will add this option in the next release
Author
Owner

@e-renna commented on GitHub (Dec 7, 2022):

Hi @mlsmaycon, just curious to know if there is any updates regarding this feature.

@e-renna commented on GitHub (Dec 7, 2022): Hi @mlsmaycon, just curious to know if there is any updates regarding this feature.
Author
Owner

@mlsmaycon commented on GitHub (Dec 8, 2022):

Hello @e-renna, we will need a refactor for the client's configuration to prevent future problems. Sorry, but it will take a few more releases to have the flag.

In the meantime, since version v0.11.3, the port check follows the order below:

  1. listen on NetBird IP with port 53
  2. listen on loopback (127.0.0.1) on port 53
  3. listen on a fake loopback address (127.0.0.153) on port 53

If neither of those is available, it repeats steps 1 to 3 with the custom port 5053

@mlsmaycon commented on GitHub (Dec 8, 2022): Hello @e-renna, we will need a refactor for the client's configuration to prevent future problems. Sorry, but it will take a few more releases to have the flag. In the meantime, since version v0.11.3, the port check follows the order below: 1. listen on NetBird IP with port 53 2. listen on loopback (127.0.0.1) on port 53 3. listen on a fake loopback address (127.0.0.153) on port 53 If neither of those is available, it repeats steps 1 to 3 with the custom port 5053
Author
Owner

@wuchang1123 commented on GitHub (Dec 24, 2022):

At present, I modify it directly and pack it myself.

@wuchang1123 commented on GitHub (Dec 24, 2022): At present, I modify it directly and pack it myself.
Author
Owner

@e-renna commented on GitHub (Jan 26, 2023):

Closing this issue as it has been solved by @mlsmaycon with the following PR: #652
Thank you!

@e-renna commented on GitHub (Jan 26, 2023): Closing this issue as it has been solved by @mlsmaycon with the following PR: #652 Thank you!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#240