Skip to content
Closed
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
34 changes: 21 additions & 13 deletions how-to/wireguard-vpn/peer-to-site-on-router.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,27 @@
In this diagram, we are depicting a home network with some devices and a router where we can install WireGuard.

```
Copy link
Collaborator

Choose a reason for hiding this comment

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

The rendered preview isn't rendering as a mermaid diagram because Sphinx sees the triple backticks and thinks it's a code block. Instead of the code block backticks, you need to wrap the mermaid code in:

:::{mermaid}
<diagram bits>
:::

Or something like that :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

You can check if it's rendered properly by running the make clean followed by make run commands in your terminal, and then opening the local preview.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good morning @s-makin !
Thank you for your help and I am sorry I used the backticks in the wrong place :-(
I will do more work over the weekend. Thank you again. :-)

Copy link
Collaborator

Choose a reason for hiding this comment

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

No apology needed, mermaid can be fiddly at first :)

public internet ┌─── wg0 10.10.11.1/24
10.10.11.2/24 │ VPN network
home0│ xxxxxx ppp0 ┌───────┴┐
┌─┴──┐ xx xxxxx ──────┤ router │
│ ├─wlan0 xx xx └───┬────┘ home network, .home domain
│ │ xx x │.1 10.10.10.0/24
│ │ xxx xxx └───┬─────────┬─────────┐
└────┘ xxxxxx │ │ │
Laptop in ┌─┴─┐ ┌─┴─┐ ┌─┴─┐
Coffee shop │ │ │ │ │ │
│pi4│ │NAS│ │...│
│ │ │ │ │ │
└───┘ └───┘ └───┘
---
config:
layout: elk
---
flowchart LR
subgraph home["Home network (.home) — 10.10.10.0/24"]
pi4["Raspberry Pi 4"]
nas["NAS"]
dots["..."]
end
laptop["Laptop<br>Coffee shop"] -- |wlan0| --> internet((("Public Internet")))
internet -- |ppp0| --> router[["Router<br>.home = 10.10.10.1"]]
laptop -. "wg0 10.10.11.2/24" .-> vpn[("WireGuard VPN<br>10.10.11.0/24")]
router -. "wg0 10.10.11.1/24" .-> vpn
router --- pi4 & nas & dots
style laptop fill:#C8E6C9
style internet fill:#BBDEFB
style router fill:#FFF9C4
style vpn fill:#D50000
style home fill:#FFD600

```

Of course, this setup is only possible if you can install software on the router. Most of the time, when it's provided by your ISP, you can't. But some ISPs allow their device to be put into a bridge mode, in which case you can use your own device (a computer, a Raspberry PI, or something else) as the routing device.
Expand Down