Skip to content

Document the dual-stack IPv6 gateway-IP issue for self-hosted - #901

Open
emrcbrn wants to merge 2 commits into
netbirdio:mainfrom
emrcbrn:docs/selfhosted-ipv6-dualstack-ip
Open

Document the dual-stack IPv6 gateway-IP issue for self-hosted#901
emrcbrn wants to merge 2 commits into
netbirdio:mainfrom
emrcbrn:docs/selfhosted-ipv6-dualstack-ip

Conversation

@emrcbrn

@emrcbrn emrcbrn commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

What

Documents a known self-hosted deployment issue: on dual-stack hosts whose NetBird domain has an AAAA record, peers connecting over IPv6 are recorded with the Docker bridge gateway address (for example 172.30.0.1) as their Public IP in the dashboard, with Region Unknown. The value appears to flip between logins because the same peer shows its real IP over an IPv4 path.

Cause: the getting-started script creates an IPv4-only Docker network. IPv4 inbound is DNATed (source IP preserved), but IPv6 inbound has no path into the bridge and is handled by Docker's userland proxy, which re-originates the connection over IPv4 from the gateway. This happens before any reverse proxy sees the request, so X-Forwarded-For / X-Real-IP / trustedHTTPProxies cannot fix it.

Changes

Canonical content lives in one place (the quickstart), with the other two locations linking to it:

  • selfhosted/selfhosted-quickstart.mdx — new IPv6 and dual-stack hosts subsection under Troubleshoot: symptom, cause, the two-part fix (enable_ipv6 + ULA subnet on the compose network, and ip6tables in daemon.json with a warning to pair them), the AAAA-removal alternative, and the ipv6.disable=1 kernel caveat. Includes a short pointer on the domain prerequisite, and a note distinguishing this from the IPv6 overlay feature.
  • selfhosted/external-reverse-proxy.mdx — a note that the gateway-IP symptom is not a header or trustedHTTPProxies problem, linking to the fix.
  • selfhosted/troubleshooting/dashboard.mdx — a symptom-phrased entry ("Peer Public IP shows a Docker or internal IP") linking to the fix.

Ref: NET-1461

Summary by CodeRabbit

  • Documentation
    • Added IPv6 troubleshooting guidance for incorrect peer public-IP detection on dual-stack hosts.
    • Documented Docker networking behavior that can cause internal gateway addresses and unknown regions to appear.
    • Added remediation steps, including enabling Docker IPv6 networking or removing the domain’s AAAA record.
    • Linked related guidance from the reverse proxy, quickstart, and dashboard troubleshooting documentation.

On dual-stack hosts whose NetBird domain has an AAAA record, peers that
connect over IPv6 are recorded with the Docker bridge gateway (e.g.
172.30.0.1) as their Public IP, because Docker's userland proxy
re-originates the connection from the gateway before any reverse proxy
sees it. Header and trustedHTTPProxies settings cannot fix it.

- Quickstart: add an "IPv6 and dual-stack hosts" subsection under
  Troubleshoot (symptom, cause, the enable_ipv6 + ip6tables fix pair,
  and the AAAA-removal alternative), plus a short pointer on the domain
  prerequisite. Distinguishes this from overlay IPv6.
- External reverse proxy: note that the gateway-IP symptom is not a
  header problem, linking to the fix.
- Self-hosted dashboard troubleshooting: symptom-phrased entry linking
  to the fix.

Ref: NET-1461

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown

@emrcbrn is attempting to deploy a commit to the NetBird GmbH Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

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

Next review available in: 18 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

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: 3e2f87dc-50ff-4c16-9241-e25f07d563a0

📥 Commits

Reviewing files that changed from the base of the PR and between 4f4922b and ba6fc25.

📒 Files selected for processing (1)
  • src/pages/selfhosted/selfhosted-quickstart.mdx
📝 Walkthrough

Walkthrough

The documentation explains incorrect peer public-IP detection on dual-stack hosts when Docker re-originates IPv6 traffic. It documents IPv6 Docker configuration, DNS alternatives, kernel limitations, and links the guidance from related self-hosted pages.

Changes

IPv6 peer address guidance

Layer / File(s) Summary
Dual-stack Docker troubleshooting guidance
src/pages/selfhosted/selfhosted-quickstart.mdx, src/pages/selfhosted/external-reverse-proxy.mdx, src/pages/selfhosted/troubleshooting/dashboard.mdx
The documentation explains Docker bridge gateway addresses, IPv6 traffic re-origination, Docker IPv6 and ip6tables configuration, DNS alternatives, and kernel limitations.
Cross-reference the troubleshooting guidance
src/pages/selfhosted/selfhosted-quickstart.mdx
The public-domain requirement links to the dual-stack host guidance.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: mlsmaycon

Poem

A rabbit hops through dual-stack air,
Finds Docker’s gateway waiting there.
“Enable IPv6,” they softly say,
Or remove AAAA another way.
Clear paths now guide the fix today.

🚥 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 documented dual-stack IPv6 gateway-IP issue addressed by the pull request.
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 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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: 2

🤖 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/selfhosted/selfhosted-quickstart.mdx`:
- Around line 201-212: Update the Docker network troubleshooting instructions
around the netbird network configuration to include recreating the existing
network, using docker compose down or docker network rm before bringing the
stack up again. Explicitly warn users not to remove data volumes, and preserve
the IPv6 enablement and ULA subnet steps.
- Around line 214-220: Update the Docker ip6tables guidance in the selfhosted
quickstart to avoid grouping all pre-27 engines together: provide tested
version-specific daemon configurations, including the required experimental and
fixed-cidr-v6 settings for older engines and the supported IPv6 configuration
for Engine 28, or clearly state a tested minimum Docker Engine version.
🪄 Autofix (Beta)

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: ad1d7192-11bb-4541-93b5-6e3847d21094

📥 Commits

Reviewing files that changed from the base of the PR and between fe16bcb and 4f4922b.

📒 Files selected for processing (3)
  • src/pages/selfhosted/external-reverse-proxy.mdx
  • src/pages/selfhosted/selfhosted-quickstart.mdx
  • src/pages/selfhosted/troubleshooting/dashboard.mdx

Comment thread src/pages/selfhosted/selfhosted-quickstart.mdx Outdated
Comment thread src/pages/selfhosted/selfhosted-quickstart.mdx Outdated
- The fix applies to a running deployment, and Docker only reads network
  options when it first creates a network, so add a step to recreate the
  netbird network (docker compose down/up), with a warning not to remove
  data volumes.
- Make the daemon.json guidance version-specific: ip6tables is default
  on Docker Engine 27+, and older engines need "experimental": true.
  Drop the daemon-level "ipv6": true, which only affects the default
  bridge and is not needed here.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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