DNS Resolver should return NXDOMAIN #817

Closed
opened 2025-11-20 05:17:58 -05:00 by saavagebueno · 0 comments
Owner

Originally created by @euh2 on GitHub (Apr 20, 2024).

The problem

The Netbird client adds its domain as a search domain in /etc/resolv.conf. That's all good and fine. But many applications go through all search domains when trying to resolve an address. That means that e.g. a query for ww.google.com will hit the local Netbird resolver with www.google.com.netbird.cloud. Netbird then returns an empty A record with a NOERROR flag.
The application then stops lookup with "address not found" or similar.

> dig www.google.com.netbird.cloud.

; <<>> DiG 9.18.24 <<>> www.google.com.netbird.cloud.
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7884
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;www.google.com.netbird.cloud.   IN      A

;; Query time: 1 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Sat Apr 20 18:34:30 CEST 2024
;; MSG SIZE  rcvd: 56

(I replaced my custom domain with "netbird.cloud")

If the local Netbird resolver would return NXDOMAIN, the application would continue its lookup. Which it absolutely should do!

To Reproduce

See above.

Expected behavior

The local Netbird resolver should return NXDOMAIN when no valid record is found.

Are you using NetBird Cloud?

Self-hosted

NetBird version

0.27.3

NetBird status -d output:

Not applicable

Screenshots

Not applicable

Additional context

Anything I forgot to mention?

Originally created by @euh2 on GitHub (Apr 20, 2024). **The problem** The Netbird client adds its domain as a `search domain` in `/etc/resolv.conf`. That's all good and fine. But many applications go through all search domains when trying to resolve an address. That means that e.g. a query for `ww.google.com` will hit the local Netbird resolver with `www.google.com.netbird.cloud`. Netbird then returns an empty A record with a `NOERROR` flag. The application then stops lookup with "address not found" or similar. ``` > dig www.google.com.netbird.cloud. ; <<>> DiG 9.18.24 <<>> www.google.com.netbird.cloud. ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7884 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 65494 ;; QUESTION SECTION: ;www.google.com.netbird.cloud. IN A ;; Query time: 1 msec ;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP) ;; WHEN: Sat Apr 20 18:34:30 CEST 2024 ;; MSG SIZE rcvd: 56 ``` *(I replaced my custom domain with "netbird.cloud")* If the local Netbird resolver would return NXDOMAIN, the application would continue its lookup. Which it absolutely should do! **To Reproduce** See above. **Expected behavior** The local Netbird resolver should return `NXDOMAIN` when no valid record is found. **Are you using NetBird Cloud?** Self-hosted **NetBird version** 0.27.3 **NetBird status -d output:** Not applicable **Screenshots** Not applicable **Additional context** Anything I forgot to mention?
saavagebueno added the bug label 2025-11-20 05:17:58 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#817