[GH-ISSUE #4864] Peer clients seem to ignore upstream nameservers #9962

Open
opened 2026-08-05 01:24:09 -04:00 by saavagebueno · 2 comments
Owner

Originally created by @TimTheOverlord on GitHub (Nov 26, 2025).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/4864

Describe the problem

I’m running a self-hosted NetBird setup (0.60.2) using Authentik as the IdP and Caddy as a reverse proxy, following the advanced self-hosting guide. I also have an AdGuard Home instance. Everything (Caddy, Authentik, NetBird, AdGuard Home) is on a single Docker host core-srv (192.168.50.16). I have a NetBird exit node on a separate host (gp-srv@192.168.50.24) I’m trying to use NetBird’s DNS features + wildcard routing so that, once peers connect, they resolve vpn.mydomain.com and all other hostnames via AdGuard.

However, after connecting to NetBird, the only DNS queries that make their way to AdGuard are LAN rewrites I've set, excluding vpn.mydomain.com, which continues to resolve to the WAN IP unless I explicitly target AdGuard with @192.168.50.16 in my domain queries. It looks like queries for this hostname, as well as all other public names, are bypassing the NetBird DNS/wildcard routing logic. I've tested this on Linux, Windows, and Android clients.

In Cloudflare, I've configured:

  • vpn.mydomain.com -> WAN IP

In AdGuard I've configured:

  • vpn.mydomain.com -> 192.168.50.16

In NetBird, I've configured the following:

  • Nameserver for 192.168.50.16
    • Configured for all domains
    • Configured for all peers
  • Network for MyNetwork
    • Resources for 192.168.50.16/32, 192.168.50.0/24, *.mydomain.com
    • Routed through gp-srv@192.168.50.24
    • Configured for all peers
  • Policy to allow all peers to 192.168.50.16:53
  • Enabled the DNS wildcard routing setting

As I mentioned, the expected behavior is that once clients connect to NetBird, they use the configured Nameserver to resolve all DNS queries (vpn.mydomain.com, newegg.com, google.com all go through AdGuard in my case). The actual behavior is that after connecting to NetBird:

  • dig/nslookup commands using default servers on clients appear use the NetBird local resolver (127.0.0.53 for Linux, 100.99.255.254 for Windows).
  • Unless specifying the AdGuard instance in those dig/nslookup commands, vpn.mydomain.com always resolves to my WAN IP from the Cloudflare DNS record. When specifying the AdGuard instance in those commands, the correct IP (192.168.50.16) is resolved.
  • When running tcpdump -ni wt0 udp port 53 on the exit node, only requests for LAN DNS rewrites make it across the exit node, no other DNS requests come through the exit node.

Are you using NetBird Cloud?

Self-hosted NetBird.

NetBird version

0.60.2

Is any other VPN software installed?

No

Debug output

To help us resolve the problem, please attach the following anonymized status output

netbird debug for 1m -AS

Attached in a .zip
netbird.debug.454865632.zip

Additional context

I'm willing to be told I did something wrong in setting up NetBird or I'm doing something really dumb on my DNS side of things. Am I incorrect in thinking clients will adjust their DNS settings to take on nameserver configurations from the NetBird tunnel (yes, I did make sure that private DNS settings were turned off on client devices)?

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 @TimTheOverlord on GitHub (Nov 26, 2025). Original GitHub issue: https://github.com/netbirdio/netbird/issues/4864 **Describe the problem** I’m running a self-hosted NetBird setup (0.60.2) using Authentik as the IdP and Caddy as a reverse proxy, following the advanced self-hosting guide. I also have an AdGuard Home instance. Everything (Caddy, Authentik, NetBird, AdGuard Home) is on a single Docker host `core-srv` (`192.168.50.16`). I have a NetBird exit node on a separate host (`gp-srv@192.168.50.24`) I’m trying to use NetBird’s DNS features + wildcard routing so that, once peers connect, they resolve `vpn.mydomain.com` and all other hostnames via AdGuard. However, after connecting to NetBird, the only DNS queries that make their way to AdGuard are LAN rewrites I've set, excluding `vpn.mydomain.com`, which continues to resolve to the WAN IP unless I explicitly target AdGuard with `@192.168.50.16` in my domain queries. It looks like queries for this hostname, as well as all other public names, are bypassing the NetBird DNS/wildcard routing logic. I've tested this on Linux, Windows, and Android clients. In Cloudflare, I've configured: - `vpn.mydomain.com` -> WAN IP In AdGuard I've configured: - `vpn.mydomain.com` -> `192.168.50.16` In NetBird, I've configured the following: - Nameserver for `192.168.50.16` - Configured for all domains - Configured for all peers - Network for MyNetwork - Resources for `192.168.50.16/32`, `192.168.50.0/24`, `*.mydomain.com` - Routed through `gp-srv@192.168.50.24` - Configured for all peers - Policy to allow all peers to `192.168.50.16:53` - Enabled the DNS wildcard routing setting As I mentioned, the expected behavior is that once clients connect to NetBird, they use the configured Nameserver to resolve all DNS queries (`vpn.mydomain.com`, `newegg.com`, `google.com` all go through AdGuard in my case). The actual behavior is that after connecting to NetBird: - `dig`/`nslookup` commands using default servers on clients appear use the NetBird local resolver (`127.0.0.53` for Linux, `100.99.255.254` for Windows). - Unless specifying the AdGuard instance in those `dig`/`nslookup` commands, `vpn.mydomain.com` always resolves to my WAN IP from the Cloudflare DNS record. When specifying the AdGuard instance in those commands, the correct IP (192.168.50.16) is resolved. - When running `tcpdump -ni wt0 udp port 53` on the exit node, only requests for LAN DNS rewrites make it across the exit node, no other DNS requests come through the exit node. **Are you using NetBird Cloud?** Self-hosted NetBird. **NetBird version** `0.60.2` **Is any other VPN software installed?** No **Debug output** To help us resolve the problem, please attach the following anonymized status output `netbird debug for 1m -AS` Attached in a .zip [netbird.debug.454865632.zip](https://github.com/user-attachments/files/23777812/netbird.debug.454865632.zip) **Additional context** I'm willing to be told I did something wrong in setting up NetBird or I'm doing something really dumb on my DNS side of things. Am I incorrect in thinking clients will adjust their DNS settings to take on nameserver configurations from the NetBird tunnel (yes, I did make sure that private DNS settings were turned off on client devices)? **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 - [~] 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 2026-08-05 01:24:09 -04:00
Author
Owner

@TimTheOverlord commented on GitHub (Nov 28, 2025):

As an update, I've done some additional debugging on my client devices:

  • I am mistaken in saying that other domains (google.com, newegg.com, other LAN names like my IdP at auth.mydomain.com) are not making their way up to the AdGuard Home instance. I've checked on clients and on the exit node again with tcpdump and saw queries exiting clients and receiving responses on wt0. I also did see logs in AdGuard showing resolution of those names.
  • Queries for vpn.mydomain.com are still routed to, and answered by, the client's lo interface. I've checked, and that name is never resolved with wt0.
  • The whole system (data plane containers, exit nodes, and clients) has been updated to 0.60.3 with no change in behavior.
  • I've reconfigured Netbird, with no changes in this problem:
    • I've kept the network and it's resources.
    • I've added a new group that consists of all peers.
    • Via the Networks screen, I've added this group to all of the network resources.
    • Via the Groups screen, I've added my Nameserver by IP.
    • Via the Groups screen, I've added two network routes: 192.168.50.0/24 and *.mydomain.com both through the gp-srv exit node.
    • Via the Groups screen, I've added a policy that permits this group to talk to this group just so it's explicitly indicated.
<!-- gh-comment-id:3589996913 --> @TimTheOverlord commented on GitHub (Nov 28, 2025): As an update, I've done some additional debugging on my client devices: - I am mistaken in saying that other domains (google.com, newegg.com, other LAN names like my IdP at auth.mydomain.com) are not making their way up to the AdGuard Home instance. I've checked on clients and on the exit node again with `tcpdump` and saw queries exiting clients and receiving responses on `wt0`. I also did see logs in AdGuard showing resolution of those names. - Queries for vpn.mydomain.com are still routed to, and answered by, the client's `lo` interface. I've checked, and that name is never resolved with `wt0`. - The whole system (data plane containers, exit nodes, and clients) has been updated to `0.60.3` with no change in behavior. - I've reconfigured Netbird, with no changes in this problem: - I've kept the network and it's resources. - I've added a new group that consists of all peers. - Via the Networks screen, I've added this group to all of the network resources. - Via the Groups screen, I've added my Nameserver by IP. - Via the Groups screen, I've added two network routes: `192.168.50.0/24` and `*.mydomain.com` both through the gp-srv exit node. - Via the Groups screen, I've added a policy that permits this group to talk to this group just so it's explicitly indicated.
Author
Owner

@TimTheOverlord commented on GitHub (Nov 28, 2025):

I did further experimentation with some kind of success but also not really? I have a Ubiquiti Router (UDM-SE) and have 192.168.50.0/24 as a separate network and had the Isolate Network setting enabled. For whatever reason, this prevented hairpin NATing from redirecting requests from LAN to my WAN back into my LAN. Disabling that setting allows my VPN clients to load vpn.mydomain.com now, but still from the WAN/public name. This happening even though I still have a private DNS name set for vpn.mydomain.com in AdGuard to point to the LAN IP, not public IP. As a note, I've been using a mixture of dig/nslookup and resolvectl query commands with roughly equal performance out of each of them.

So even though I've fixed the hairpin NAT issue, this hasn't changed the DNS issue I've found.

On a Linux client connected to my NetBird instance, running resolvectl status results this:

Global
       Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: foreign
      DNS Domain: localdomain netbird.mydomain

Link 2 (enp39s0)
    Current Scopes: DNS
         Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 192.168.1.1
       DNS Servers: 192.168.1.1
        DNS Domain: localdomain

...

Link 11 (wt0)
    Current Scopes: DNS
         Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 100.99.234.199
       DNS Servers: 100.99.234.199
        DNS Domain: netbird.mydomain ~. ~99.100.in-addr.arpa

Running resolvectl query portainer.ui.mydomain.com returns the expected AdGuard rewrite:

portainer.ui.mydomain.com: 192.168.50.16   -- link: wt0

-- Information acquired via protocol DNS in 45.6ms.
-- Data is authenticated: no; Data was acquired via local or encrypted transport: no
-- Data from: network

Meanwhile, running resolvectl query vpn.mydomain.com returns my WAN IP, coming from my Cloudflare DNS entry:

resolvectl query vpn.huffconnect.net
vpn.mydomain.com: [REDACTED WAN IP]             -- link: wt0

-- Information acquired via protocol DNS in 47.3ms.
-- Data is authenticated: no; Data was acquired via local or encrypted transport: no
-- Data from: cache network

And running dig kinda shows the issue pretty transparently:

dig @192.168.50.16 vpn.mydomain.com

; <<>> DiG 9.18.39-0ubuntu0.22.04.2-Ubuntu <<>> @192.168.50.16 vpn.mydomain.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2042
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;vpn.mydomain.com.		IN	A

;; ANSWER SECTION:
vpn.mydomain.com.	10	IN	A	192.168.50.16

;; Query time: 44 msec
;; SERVER: 192.168.50.16#53(192.168.50.16) (UDP)
;; WHEN: Fri Nov 28 19:07:07 EST 2025
;; MSG SIZE  rcvd: 53


dig @100.99.234.199 vpn.mydomain.com

; <<>> DiG 9.18.39-0ubuntu0.22.04.2-Ubuntu <<>> @100.99.234.199 vpn.mydomain.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61894
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;vpn.mydomain.com.		IN	A

;; ANSWER SECTION:
vpn.mydomain.com.	300	IN	A	[REDACTED WAN IP]

;; Query time: 0 msec
;; SERVER: 100.99.234.199#53(100.99.234.199) (UDP)
;; WHEN: Fri Nov 28 19:07:19 EST 2025
;; MSG SIZE  rcvd: 72

In the NetBird Dashboard, I've tried two different configurations with no change. I've tried a simple "Nameserver + Exit Node + Network Route" model with gp-srv@192.168.50.24 as the exit node, a globally set nameserver of 192.168.50.16, and a network route to get to the nameserver via the Exit Node, which was not successful. I've also tried a Network with resources, a Nameserver, DNS wildcard routing, and a routing peer (again being gp-srv@192.168.50.24) with no change either. So I'm not sure what else to try at this point.

<!-- gh-comment-id:3590810536 --> @TimTheOverlord commented on GitHub (Nov 28, 2025): I did further experimentation with some kind of success but also not really? I have a Ubiquiti Router (UDM-SE) and have 192.168.50.0/24 as a separate network and had the `Isolate Network` setting enabled. For whatever reason, this prevented hairpin NATing from redirecting requests from LAN to my WAN back into my LAN. Disabling that setting allows my VPN clients to load vpn.mydomain.com now, but still from the WAN/public name. This happening even though I still have a private DNS name set for vpn.mydomain.com in AdGuard to point to the LAN IP, not public IP. As a note, I've been using a mixture of `dig`/`nslookup` and `resolvectl query` commands with roughly equal performance out of each of them. So even though I've fixed the hairpin NAT issue, this hasn't changed the DNS issue I've found. On a Linux client connected to my NetBird instance, running `resolvectl status` results this: ``` Global Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported resolv.conf mode: foreign DNS Domain: localdomain netbird.mydomain Link 2 (enp39s0) Current Scopes: DNS Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported Current DNS Server: 192.168.1.1 DNS Servers: 192.168.1.1 DNS Domain: localdomain ... Link 11 (wt0) Current Scopes: DNS Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported Current DNS Server: 100.99.234.199 DNS Servers: 100.99.234.199 DNS Domain: netbird.mydomain ~. ~99.100.in-addr.arpa ``` Running `resolvectl query portainer.ui.mydomain.com` returns the expected AdGuard rewrite: ``` portainer.ui.mydomain.com: 192.168.50.16 -- link: wt0 -- Information acquired via protocol DNS in 45.6ms. -- Data is authenticated: no; Data was acquired via local or encrypted transport: no -- Data from: network ``` Meanwhile, running `resolvectl query vpn.mydomain.com` returns my WAN IP, coming from my Cloudflare DNS entry: ``` resolvectl query vpn.huffconnect.net vpn.mydomain.com: [REDACTED WAN IP] -- link: wt0 -- Information acquired via protocol DNS in 47.3ms. -- Data is authenticated: no; Data was acquired via local or encrypted transport: no -- Data from: cache network ``` And running `dig` kinda shows the issue pretty transparently: ``` dig @192.168.50.16 vpn.mydomain.com ; <<>> DiG 9.18.39-0ubuntu0.22.04.2-Ubuntu <<>> @192.168.50.16 vpn.mydomain.com ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2042 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;vpn.mydomain.com. IN A ;; ANSWER SECTION: vpn.mydomain.com. 10 IN A 192.168.50.16 ;; Query time: 44 msec ;; SERVER: 192.168.50.16#53(192.168.50.16) (UDP) ;; WHEN: Fri Nov 28 19:07:07 EST 2025 ;; MSG SIZE rcvd: 53 dig @100.99.234.199 vpn.mydomain.com ; <<>> DiG 9.18.39-0ubuntu0.22.04.2-Ubuntu <<>> @100.99.234.199 vpn.mydomain.com ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61894 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;vpn.mydomain.com. IN A ;; ANSWER SECTION: vpn.mydomain.com. 300 IN A [REDACTED WAN IP] ;; Query time: 0 msec ;; SERVER: 100.99.234.199#53(100.99.234.199) (UDP) ;; WHEN: Fri Nov 28 19:07:19 EST 2025 ;; MSG SIZE rcvd: 72 ``` In the NetBird Dashboard, I've tried two different configurations with no change. I've tried a simple "Nameserver + Exit Node + Network Route" model with gp-srv@192.168.50.24 as the exit node, a globally set nameserver of 192.168.50.16, and a network route to get to the nameserver via the Exit Node, which was not successful. I've also tried a Network with resources, a Nameserver, DNS wildcard routing, and a routing peer (again being gp-srv@192.168.50.24) with no change either. So I'm not sure what else to try at this point.
Sign in to join this conversation.
No Label triage-needed
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#9962