Skip to content

chore(docs): add requirements re ports and stun server to docs #12026

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Feb 12, 2024

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented Feb 6, 2024

Fixes #11876

@johnstcn johnstcn self-assigned this Feb 6, 2024
source ports `udp/3478` and `udp/41641` to all destination ports.
> For more detailed information, see
> [What firewall ports should I open to use Tailscale? (tailscale.com)](https://tailscale.com/kb/1082/firewall-ports).

Copy link
Member

Choose a reason for hiding this comment

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

There should probably be some details about NATs and stuff but I really don't know what to write without getting super technical :/

Copy link
Member Author

Choose a reason for hiding this comment

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

Honestly I'd prefer to just link to Tailscale's docs on this.

Copy link
Member

Choose a reason for hiding this comment

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

IDK how well Tailscale's docs cut it, this one doesn't really explain much about NAT just about firewalls.

Copy link
Member Author

Choose a reason for hiding this comment

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

I link to https://tailscale.com/blog/how-nat-traversal-works a bit above in the STUN section.

Copy link
Member

Choose a reason for hiding this comment

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

This is a good blog post but it's not very good documentation since it's 9000 words long. We should probably dumb it down

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, I added a fairly high-level overview.

Copy link
Contributor

Choose a reason for hiding this comment

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

I've Slack'd you some diagrams. If we're going to explain it, then those are my suggested examples.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added and moved to a separate page as this one is getting plenty big already.

johnstcn and others added 2 commits February 6, 2024 15:41
Co-authored-by: Dean Sheather <dean@deansheather.com>
@johnstcn johnstcn requested a review from deansheather February 6, 2024 16:59
source ports `udp/3478` and `udp/41641` to all destination ports.
> For more detailed information, see
> [What firewall ports should I open to use Tailscale? (tailscale.com)](https://tailscale.com/kb/1082/firewall-ports).

Copy link
Contributor

Choose a reason for hiding this comment

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

I've Slack'd you some diagrams. If we're going to explain it, then those are my suggested examples.

@johnstcn johnstcn requested a review from spikecurtis February 8, 2024 16:25
clusternat --- corpnat
corpnat --> stun1
corpnat --> stun2
```
Copy link
Member Author

Choose a reason for hiding this comment

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

flowchart TD
  subgraph homenet["Home Network"]
    client["Client workstation\n192.168.1.101"]
    homenat["Home Router/NAT\n65.4.3.21"]
  end
  subgraph internet["Public Internet"]
    stun1["Public STUN"]
    vpn1["VPN entry node"]
  end
  subgraph corpnet["Corp Network 172.16.1.0/24"]
    corpnat["Corp Router/NAT\n172.16.1.1\n12.34.56.7"]
    vpn2["VPN exit node\n172.16.1.2"]
    stun2["Private STUN"]
    subgraph cluster["Cluster Network 10.11.12.0/16"]
      clusternat["Cluster Router/NAT\n10.11.12.1\n172.16.1.254"]
      agent["Workspace agent\n10.11.12.34"]
    end
  end
  vpn1 === vpn2
  vpn2 --> stun2
  client === homenat
  homenat === vpn1
  homenat x-.-x stun1
  agent --- clusternat
  clusternat --- corpnat
  corpnat --> stun1
  corpnat --> stun2
Loading

homenat -- "[12.34.56.7:41563]" --- internet
internet -- "[12.34.56.7:41563]" --- corpnat
corpnat -- "[10.21.43.241:56812]" --> agent
```
Copy link
Member Author

Choose a reason for hiding this comment

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

flowchart LR
  subgraph homenet["Home Network"]
    direction LR
    client["Client workstation\n192.168.1.101:38297"]
    homenat["Home Router/NAT\n65.4.3.21:29187"]
  end
  subgraph corpnet["Corp Network"]
    direction LR
    agent["Workspace agent\n10.21.43.241:56812"]
    corpnat["Corp Router/NAT\n12.34.56.7:41563"]
  end
  subgraph internet["Public Internet"]
  end
  client -- "[12.34.56.7:41563]" --- homenat
  homenat -- "[12.34.56.7:41563]" --- internet
  internet -- "[12.34.56.7:41563]" --- corpnat
  corpnat -- "[10.21.43.241:56812]" --> agent
Loading

Copy link
Contributor

Choose a reason for hiding this comment

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

It's unfortunate Mermaid lays these out differently. Presumably it's due to the arrow directions... does it look weird to keep the use of arrows consistent?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I'm honestly considering replacing with some manual drawings just so we can more easily fine-tune it.

Copy link
Member Author

Choose a reason for hiding this comment

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

For now, fixed by changing the arrow directions.

agent --- corpnat
corpnat -- "[I see 12.34.56.7:41563]" --> stun1
homenat -- "[I see 65.4.3.21:29187]" --> stun1
```
Copy link
Member Author

Choose a reason for hiding this comment

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

flowchart LR
  subgraph homenet["Network A"]
    client["Client workstation\n192.168.1.101:38297"]
    homenat["NAT\n??.??.??.??:?????"]
  end
  subgraph internet["Public Internet"]
    stun1["STUN server"]
  end
  subgraph corpnet["Network B"]
    agent["Workspace agent\n10.21.43.241:56812"]
    corpnat["NAT\n??.??.??.??:?????"]
  end
  client --- homenat
  agent --- corpnat
  corpnat -- "[I see 12.34.56.7:41563]" --> stun1
  homenat -- "[I see 65.4.3.21:29187]" --> stun1
Loading

C[Workspace Agent\n192.168.21.147:41563]
A <--> C
end
```
Copy link
Member Author

Choose a reason for hiding this comment

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

flowchart LR
    subgraph corpnet["Private Network\ne.g. Corp. LAN"]
    A[Client Workstation\n192.168.21.47:38297]
    C[Workspace Agent\n192.168.21.147:41563]
    A <--> C
    end
Loading

Copy link
Contributor

@spikecurtis spikecurtis left a comment

Choose a reason for hiding this comment

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

This is great! Couple small language tweaks and suggestions inline

homenat -- "[12.34.56.7:41563]" --- internet
internet -- "[12.34.56.7:41563]" --- corpnat
corpnat -- "[10.21.43.241:56812]" --> agent
```
Copy link
Contributor

Choose a reason for hiding this comment

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

It's unfortunate Mermaid lays these out differently. Presumably it's due to the arrow directions... does it look weird to keep the use of arrows consistent?

@johnstcn johnstcn merged commit d1a522a into main Feb 12, 2024
@johnstcn johnstcn deleted the cj/networking-ports branch February 12, 2024 11:42
@github-actions github-actions bot locked and limited conversation to collaborators Feb 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chore(docs): update /networking with information on port requirements
3 participants