Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 30 additions & 19 deletions how-to/wireguard-vpn/site-to-site.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,37 @@

Another usual VPN configuration where one could deploy WireGuard is to connect two distinct networks over the internet. Here is a simplified diagram:

The following code-block will be rendered as a Mermaid diagram:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
The following code-block will be rendered as a Mermaid diagram:

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure what this line is for, but it's saying the same thing as on line 4 so let's remove it to avoid duplication :)


```mermaid
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
```mermaid
```{mermaid}

Copy link
Collaborator

Choose a reason for hiding this comment

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

I've tested on my own local branch and putting the curly brackets around mermaid should "encourage" Sphinx to recognize this as a mermaid diagram :) if you can apply this change, when the preview is rebuilt it should show the diagram properly

flowchart LR
subgraph alpha["alpha site — 10.10.10.0/24"]
alpha_gw["wgA<br/>10.10.10.1<br/>10.10.9.0"]
a_left["..."]
a_right["..."]
alpha_gw --- a_left
alpha_gw --- a_right
end
subgraph beta["beta site — 10.10.11.0/24"]
beta_gw["wgB<br/>10.10.11.1<br/>10.10.9.1"]
b_left["..."]
b_right["..."]
beta_gw --- b_left
beta_gw --- b_right
end
internet(("public internet"))
%% External (ext) connections to the internet
alpha_gw -. "ext" .- internet
internet -. "ext" .- beta_gw
%% WireGuard tunnel between gateways
alpha_gw -. "WireGuard tunnel<br/>10.10.9.0/31" .- beta_gw
```
┌─────── WireGuard tunnel ──────┐
│ 10.10.9.0/31 │
│ │
10.10.9.0 wgA│ xx │wgB 10.10.9.1
┌─┴─┐ xxx xxxx ┌─┴─┐
alpha site │ │ext xx xx ext│ │ beta site
│ ├─── x x ───┤ │
10.10.10.0/24 │ │ xx xx │ │ 10.10.11.0/24
│ │ x x │ │
└─┬─┘ x x └─┬─┘
10.10.10.1│ xx x │10.10.11.1
...┌─────────┬────┘ xx xxx xx └───┬─────────┐...
│ │ xx xxxxx │ │
│ │ │ │
┌─┴─┐ ┌─┴─┐ public internet ┌─┴─┐ ┌─┴─┐
│ │ │ │ │ │ │ │
└───┘ └───┘ └───┘ └───┘
```

The goal here is to seamlessly integrate network **alpha** with network **beta**, so that systems on the alpha site can transparently access systems on the beta site, and vice-versa.

Such a setup has a few particular details:
Expand Down