diff --git a/how-to/wireguard-vpn/peer-to-site-on-router.md b/how-to/wireguard-vpn/peer-to-site-on-router.md index bfa9239e..dab267f2 100644 --- a/how-to/wireguard-vpn/peer-to-site-on-router.md +++ b/how-to/wireguard-vpn/peer-to-site-on-router.md @@ -4,20 +4,33 @@ In this diagram, we are depicting a home network with some devices and a router where we can install WireGuard. +```mermaid + +flowchart LR + home0["home0"] + laptop["Laptop in Coffee shop"] + home0 --> laptop + + internet(("public internet")) + vpn(("VPN network")) + + subgraph home["home network, .home domain — 10.10.10.0/24"] + router["router (.1)"] + pi4["pi4"] + nas["NAS"] + extra["Y"] + dots["..."] + router --- pi4 + router --- nas + router --- extra + router --- dots + end + + laptop -- wlan0 --> internet + internet -- ppp0 --> router + laptop -. "wg0 10.10.11.2/24" .-> vpn + router -. "wg0 10.10.11.1/24" .-> vpn ``` - 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│ │...│ - │ │ │ │ │ │ - └───┘ └───┘ └───┘ ``` 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. diff --git a/how-to/wireguard-vpn/peer-to-site.md b/how-to/wireguard-vpn/peer-to-site.md index 431dfeb4..3f3ae054 100644 --- a/how-to/wireguard-vpn/peer-to-site.md +++ b/how-to/wireguard-vpn/peer-to-site.md @@ -10,24 +10,28 @@ Where to place the remote WireGuard endpoint in the network will vary a lot depe Here we will cover a simpler case more resembling what a home network could be like: -``` - public internet - - xxxxxx ppp0 ┌────────┐ - ┌────┐ xx xxxx ──┤ router │ - │ ├─ppp0 xxx xx └───┬────┘ - │ │ xx x │ home 10.10.10.0/24 - │ │ xxx xxx └───┬─────────┬─────────┐ - └────┘ xxxxx │ │ │ - ┌─┴─┐ ┌─┴─┐ ┌─┴─┐ - │ │ │ │ │ │ - │pi4│ │NAS│ │...│ - │ │ │ │ │ │ - └───┘ └───┘ └───┘ + +```mermaid + +flowchart LR + subgraph home["Home LAN 10.10.10.0/24"] + pi4["Raspberry Pi 4"] + nas["NAS"] + extra["Y"] + dots["..."] + end + host["Host"] -- ppp0 --> internet((("Public Internet"))) + internet -- ppp0 --> router[["Router"]] + router --- pi4 & nas & extra & dots + style host fill:#FFE0B2 + style internet fill:#BBDEFB + style router fill:#FFF9C4 + style home fill:#FFD600 + ``` -This diagram represents a typical simple home network setup. You have a router/modem, usually provided by the ISP (Internet Service Provider), and some internal devices like a Raspberry PI perhaps, a NAS (Network Attached Storage), and some other device. +This diagram represents a typical simple home network setup. You have a router/modem, usually provided by the ISP (Internet Service Provider), and some internal devices like a Raspberry PI perhaps, a NAS (Network Attached Storage), and some other devices. There are basically two approaches that can be taken here: install WireGuard {ref}`on the router `, or on {ref}`another system in the home network `.