Skip to content

Add Troubleshooting relayed connections teaching page#791

Merged
SunsetDrifter merged 2 commits into
mainfrom
docs/troubleshooting-relayed-connections
Jun 12, 2026
Merged

Add Troubleshooting relayed connections teaching page#791
SunsetDrifter merged 2 commits into
mainfrom
docs/troubleshooting-relayed-connections

Conversation

@SunsetDrifter

@SunsetDrifter SunsetDrifter commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a new help-section page, Troubleshooting relayed connections (/help/troubleshooting-relayed-connections), written as a teaching document in the style of the Networks overview. It walks an IT admin from Connection type: Relayed to either a restored P2P connection or a justified stop:

  • Mental model: a relayed connection is the safety net after a failed hole punch — the job is to determine whether you're facing a fixable blocker (Signal/STUN/UDP blocked somewhere) or an unfixable NAT (symmetric/CGNAT on both sides), where relay is the designed outcome.
  • The four players: NAT, Signal, STUN, Relay — each mapped to exactly one diagnostic check.
  • ICE candidate reading: one table replacing scattered examples; the weaker side (relay/-) is where to look.
  • Elimination-based decision flow: environment triage → control plane → STUN (via the Relays: section of netbird status -d) → host firewall → repeat on the other peer → conclude or escalate. Explicit stop conditions throughout.
  • Worked walkthrough: laptop ↔ office server where the office egress firewall drops outbound UDP to STUN.
  • When relay is the right answer, including a note explicitly recommending against port forwarding workarounds — every fix on the page is an outbound rule or a host wt0 allowance, in line with the no-inbound-ports promise.

Restructuring

  • understanding-nat-and-connectivity.mdx becomes purely conceptual: the troubleshooting-oriented sections (Checking Your Connection Type, Tips for Improving P2P Success) moved into the new page, replaced by pointer links. Also adds the missing description export and fixes a small typo.
  • troubleshooting-client.mdx gains a pointer at the Connection type field explanation.
  • NavigationDocs.jsx: sidebar entry under GET MORE HELP.

Status snippets follow current client output (0.72.x): no Direct: field, rels:// relay addresses, Networks: field.

Separate fix

The STUN nftables example in ports-and-firewalls allowed tcp dport 443-443, but STUN runs on UDP 80/443/3478/5555. Corrected, with a note that nftables resolves hostnames only at ruleset load (relevant for a dynamic geo-distributed pool).

Summary by CodeRabbit

  • Documentation
    • Added comprehensive troubleshooting guide for relayed connections with diagnostic steps and P2P conversion guidance.
    • Updated firewall configuration examples for STUN connectivity with clarification on hostname resolution behavior.
    • Enhanced cross-linking between troubleshooting resources for improved discoverability.

Adds a help-section teaching doc that walks junior admins from
'Connection type: Relayed' to a fixed P2P connection (or a justified
stop): mental model, the four players (NAT/Signal/STUN/Relay), ICE
candidate reading, an elimination-based decision flow, a port-forwarding
escape hatch, a worked walkthrough, and when relay is the right answer.

Moves the troubleshooting-oriented sections (Checking Your Connection
Type, Tips for Improving P2P Success) out of Understanding NAT and
Connectivity, leaving it purely conceptual with pointers to the new
page. Adds sidebar entry and a pointer from troubleshooting-client.
The STUN service runs on UDP 80/443/3478/5555, but the example rule
allowed TCP/443. Also note that nftables resolves hostnames at
ruleset-load time only, which matters for a dynamic geo-distributed
endpoint pool.
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 037883f7-8967-428e-a32c-4f4b852e15bf

📥 Commits

Reviewing files that changed from the base of the PR and between b70301e and a2d3757.

📒 Files selected for processing (5)
  • src/components/NavigationDocs.jsx
  • src/pages/about-netbird/ports-and-firewalls.mdx
  • src/pages/about-netbird/understanding-nat-and-connectivity.mdx
  • src/pages/help/troubleshooting-client.mdx
  • src/pages/help/troubleshooting-relayed-connections.mdx

📝 Walkthrough

Walkthrough

This PR introduces a comprehensive troubleshooting guide for NetBird relayed connections and consolidates related content. It adds a new diagnostic page, updates the documentation navigation, simplifies existing guides by redirecting to the new resource, and refines firewall configuration examples with clarifications on dynamic hostname resolution.

Changes

Relayed Connections Troubleshooting Hub

Layer / File(s) Summary
New troubleshooting relayed connections page
src/pages/help/troubleshooting-relayed-connections.mdx
Comprehensive new MDX page covering diagnostic flow with netbird status -d, mental models of fixable vs unfixable blockers, the four-player model (NAT/Signal/STUN/Relay), ICE candidate interpretation, six-step decision logic (environment triage → control-plane → STUN → host firewall → repetition → conclusion), concrete walkthrough of converting a relayed connection to P2P, acceptance criteria for when relay is designed behavior, rollout checklist, recap, and related navigation tiles with description export.
Navigation integration and cross-page linking
src/components/NavigationDocs.jsx, src/pages/help/troubleshooting-client.mdx, src/pages/about-netbird/understanding-nat-and-connectivity.mdx
NavigationDocs adds a new link to the troubleshooting page in the "GET MORE HELP" group; troubleshooting-client inserts an inline link after relayed-connection explanation; understanding-nat-and-connectivity replaces the "Checking Your Connection Type" CLI walkthrough and "Tips for Improving P2P Success" section with single-sentence pointers to the new resource.
Documentation refactoring and metadata exports
src/pages/about-netbird/understanding-nat-and-connectivity.mdx, src/pages/about-netbird/ports-and-firewalls.mdx
Adds description exports to understanding-nat-and-connectivity; updates STUN nftables firewall rule from TCP to UDP allowlist (ports 80, 443, 3478, 5555); adds clarification that nftables hostname resolution only occurs at ruleset load time, requiring periodic updates due to dynamic geo-distributed IPs; applies grammar fix in the "1:1 NAT" section.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • TechHutTV

Poem

🐰 A warren of relays once confused the way,
Now hop through the troubleshooting, step-by-step, hooray!
From NAT to STUN, the path is made clear—
P2P connections bloom when blockers disappear! 🌱✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/troubleshooting-relayed-connections

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


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 and usage tips.

@SunsetDrifter SunsetDrifter marked this pull request as ready for review June 12, 2026 16:49
@SunsetDrifter SunsetDrifter merged commit b344041 into main Jun 12, 2026
3 checks passed
@SunsetDrifter SunsetDrifter deleted the docs/troubleshooting-relayed-connections branch June 12, 2026 16:49
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.

2 participants