Skip to content
Closed
Show file tree
Hide file tree
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
39 changes: 26 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 @@ -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.
Expand Down
34 changes: 19 additions & 15 deletions how-to/wireguard-vpn/peer-to-site.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <wireguard-vpn-peer-to-site-on-router>`, or on {ref}`another system in the home network <wireguard-on-an-internal-system>`.

Expand Down