Skip to content

docs: explain macOS DNS resolver behavior for match-only vs primary nameservers - #912

Open
SunsetDrifter wants to merge 5 commits into
mainfrom
cc/macos-dns-two-stacks
Open

docs: explain macOS DNS resolver behavior for match-only vs primary nameservers#912
SunsetDrifter wants to merge 5 commits into
mainfrom
cc/macos-dns-two-stacks

Conversation

@SunsetDrifter

@SunsetDrifter SunsetDrifter commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Documents a macOS DNS behavior that surfaced in a support case: with a match-domain nameserver group and no primary, browsers and curl resolve internal names while dig and host return NXDOMAIN, because macOS keeps the two resolver paths separate.

Changes

DNS Troubleshooting

  • New Issue 5: "dig and host Fail, but Browsers and curl Work (macOS)". Explains the split between the system resolver (getaddrinfo/mDNSResponder, which follows scoped resolvers) and tools that read /etc/resolv.conf directly, why search domains make it worse (short names expand and then hit the public resolver), how to confirm the split, which language runtimes sit on which side (pure-Go, dnspython, and c-ares miss scoped resolvers; cgo, getaddrinfo, and dns.lookup follow them), and the Windows equivalent (nslookup bypasses NRPT while Resolve-DnsName follows it). Existing Issues 5-8 renumbered to 6-9, with the cross-reference in help/troubleshooting-client/windows.mdx updated.
  • Quick Diagnostics step 6 now explains why it prescribes dscacheutil and Resolve-DnsName, and no longer recommends nslookup for Windows, since it bypasses the NRPT rule NetBird writes.

Internal DNS Servers

  • Primary vs Match Domain Nameservers: adds why a primary group matters beyond catching unmatched queries. A match-only configuration leaves resolv.conf untouched on macOS, so resolv.conf readers never follow scoped resolution; a primary puts NetBird's resolver into resolv.conf and aligns both paths.
  • Search Domains: warns against converting a match-domain group to primary by emptying its domains, which silently drops the search suffix. Domain-joined Windows machines mask the regression because AD supplies its own suffix. The right move is a second group.
  • Split-Horizon example: adds the "route all queries to internal DNS" variant with both groups on the same internal servers, the common shape when migrating from a VPN that pushed internal DNS servers for everything. Makes explicit that "VPN pushes DNS servers" maps to a primary group, not a match-domain group.

DNS overview

  • The macOS platform line said NetBird does not modify /etc/resolv.conf. That is only true for match-domain (scoped) configuration; with a primary nameserver, macOS itself regenerates resolv.conf with NetBird's resolver in it. The line now distinguishes the two cases.

Summary by CodeRabbit

  • Documentation
    • Updated Windows DNS troubleshooting guidance to reference the latest issue.
    • Clarified how macOS handles scoped and primary DNS resolvers.
    • Added guidance for configuring internal DNS servers, search domains, and public query routing.
    • Expanded troubleshooting for cases where command-line DNS tools fail while browsers and other applications work.
    • Renumbered subsequent DNS troubleshooting issues for consistency.

…y vs primary nameserver split

Lab-validated against client 0.76.3 (macOS 26, NetBird Cloud):

- DNS troubleshooting: new Issue 5 'dig and host fail, but browsers and
  curl work (macOS)' with the scoped-resolver vs resolv.conf explanation,
  the language-runtime split table (pure-Go/dnspython/c-ares vs
  getaddrinfo), and the Windows nslookup-vs-NRPT analog; renumbered
  Issues 5-8 to 6-9; checklist step 6 now says why it prescribes
  dscacheutil/Resolve-DnsName
- Internal DNS Servers: primary-vs-match now explains that match-only
  leaves resolv.conf untouched on macOS; new warning that emptying a
  match group's domains silently drops the search suffix (masked on
  domain-joined Windows); split-horizon example gains the
  route-everything-internal variant (the OpenVPN migration shape)
- DNS overview: macOS line now distinguishes scoped resolvers from the
  primary case, where configd regenerates resolv.conf with NetBird's
  resolver
@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 10, 2026 4:08pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@SunsetDrifter, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 36 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0eee67d4-bdbe-4db2-bff7-3065f81d73fa

📥 Commits

Reviewing files that changed from the base of the PR and between 124acc7 and fd7732a.

⛔ Files ignored due to path filters (1)
  • public/docs-static/img/manage/dns/nameservers-route-all-internal.png is excluded by !**/*.png
📒 Files selected for processing (2)
  • src/pages/manage/dns/internal-dns-servers.mdx
  • src/pages/manage/dns/troubleshooting.mdx
📝 Walkthrough

Walkthrough

The DNS documentation now explains macOS scoped and primary resolvers, adds internal DNS configuration guidance, improves platform-specific troubleshooting, and updates issue references.

Changes

DNS documentation

Layer / File(s) Summary
Resolver behavior and DNS configuration
src/pages/manage/dns/index.mdx, src/pages/manage/dns/internal-dns-servers.mdx
Documents macOS scoped resolvers, primary nameservers, search-domain behavior, and routing all queries through internal DNS servers.
Diagnostics and issue references
src/pages/manage/dns/troubleshooting.mdx, src/pages/help/troubleshooting-client/windows.mdx
Adds platform-specific DNS commands, documents macOS resolver differences, adds a new troubleshooting issue, and updates issue numbering and links.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: emrcbrn, techhuttv

Poem

I’m a rabbit with DNS in my ear,
Scoped resolvers now make paths clear.
Primary servers guide the way,
Search domains still work each day.
Troubleshooting hops, issues align—
Fresh docs make resolution fine.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main documentation change about macOS DNS resolver behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cc/macos-dns-two-stacks

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/pages/manage/dns/internal-dns-servers.mdx`:
- Around line 126-137: Update src/pages/manage/dns/internal-dns-servers.mdx
lines 126-137 to state that every internal DNS server must recursively resolve
or forward public domains before configuring it as the primary nameserver. Add
the same prerequisite in src/pages/manage/dns/troubleshooting.mdx line 425
before recommending the primary group as the macOS workaround.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4164d3cd-4165-4ea9-942d-133e68783536

📥 Commits

Reviewing files that changed from the base of the PR and between 4061897 and 124acc7.

📒 Files selected for processing (4)
  • src/pages/help/troubleshooting-client/windows.mdx
  • src/pages/manage/dns/index.mdx
  • src/pages/manage/dns/internal-dns-servers.mdx
  • src/pages/manage/dns/troubleshooting.mdx

Comment on lines +126 to +137
If you are migrating from a VPN that pushed your internal DNS servers for everything (a common OpenVPN setup), the equivalent is the same two groups pointing at the **same internal servers**:

**Primary (internal)**: Custom DNS with your internal DNS server IPs (e.g., 10.0.0.1, 10.0.0.2). Assign to your target group. Leave match domains empty.

**Match domain (internal)**: Same servers. Add match domain `company.internal`. Enable search domains.

Result:
- All queries, public and internal, go to your internal DNS
- `server` still expands to `server.company.internal`
- Tools that read `/etc/resolv.conf` directly and tools that use the system resolver query the same server

Two groups look redundant when they hold the same servers, but they do different jobs: the primary receives every query, while the match-domain group provides the search-domain expansion (and keeps working for scoped-resolver platforms). A VPN "pushing DNS servers" maps to the **primary** group, not to a match-domain group.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

State the public-resolution prerequisite for an internal primary nameserver.

A primary nameserver resolves all unmatched domains. If the internal DNS servers are authoritative-only and do not recurse or forward public queries, these instructions stop public DNS resolution after users apply them. (docs.netbird.io)

  • src/pages/manage/dns/internal-dns-servers.mdx#L126-L137: State that each internal DNS server must recursively resolve or forward public domains before it is configured as primary.
  • src/pages/manage/dns/troubleshooting.mdx#L425-L425: Add the same prerequisite before recommending the primary group as the macOS workaround.
📍 Affects 2 files
  • src/pages/manage/dns/internal-dns-servers.mdx#L126-L137 (this comment)
  • src/pages/manage/dns/troubleshooting.mdx#L425-L425
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/pages/manage/dns/internal-dns-servers.mdx` around lines 126 - 137, Update
src/pages/manage/dns/internal-dns-servers.mdx lines 126-137 to state that every
internal DNS server must recursively resolve or forward public domains before
configuring it as the primary nameserver. Add the same prerequisite in
src/pages/manage/dns/troubleshooting.mdx line 425 before recommending the
primary group as the macOS workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant