using custom dns resolver with systemd-resolved does not set custom port. #2365

Open
opened 2025-11-20 07:08:38 -05:00 by saavagebueno · 0 comments
Owner

Originally created by @bj0 on GitHub (Oct 12, 2025).

Describe the problem

My system is using systemd-resolved, when setting a custom dns-resolver for the netbird client, a dns entry gets added with the correct custom ip but without the custom port. The client still listens on the custom port, so any subsequent queries use the wrong port and get connection denied.

To Reproduce

  1. configure a custom address netbird up --dns-resolver-address "100.x.x.x:5573"
  2. see that the server is listening on the correct ip/port with lsof -P -n -i |grep 5573
  3. see the entry in systemd-resolved is missing the port: resolvectl status
  4. see dns fails: resolvectl query <name>.netbird.cloud gives: resolve call failed: Lookup failed due to system error: Connection refused
  • If i override the incorrect setting with resolvectl dns <link> 100.x.x.x:5573, then dns queries work correctly

Expected behavior

netbird should include the custom port when setting systemd-resolved dns server.

Are you using NetBird Cloud?

yes

NetBird version

0.59.5

Is any other VPN software installed?

vanilla wireguard

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 @bj0 on GitHub (Oct 12, 2025). **Describe the problem** My system is using systemd-resolved, when setting a custom dns-resolver for the netbird client, a dns entry gets added with the correct custom ip but without the custom port. The client still listens on the custom port, so any subsequent queries use the wrong port and get connection denied. **To Reproduce** 1. configure a custom address `netbird up --dns-resolver-address "100.x.x.x:5573"` 2. see that the server is listening on the correct ip/port with `lsof -P -n -i |grep 5573` 3. see the entry in systemd-resolved is missing the port: `resolvectl status` 4. see dns fails: `resolvectl query <name>.netbird.cloud` gives: `resolve call failed: Lookup failed due to system error: Connection refused` * If i override the incorrect setting with `resolvectl dns <link> 100.x.x.x:5573`, then dns queries work correctly **Expected behavior** netbird should include the custom port when setting `systemd-resolved` dns server. **Are you using NetBird Cloud?** yes **NetBird version** 0.59.5 **Is any other VPN software installed?** vanilla wireguard **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 2025-11-20 07:08:38 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#2365