Source Tweet for network description: https://twitter.com/lindworm/status/1451878726807998467
We assume here, that all nodes are running Linux.
IP Forwarding must be enabled on all routing nodes:
sudo sysctl -w net.ipv4.ip_forward=1Every node needs to know the route to the foreign nets.
We can either add them manually or let our main router (the one that points to 0.0.0.0) know that the corresponding net is behind a VPN router.
So we need to point the route to the foreign net to the local address of the upstream VPN router.
- On Fritz!Box: Heimnetz -> Netzwerk -> Netzwerkeinstellungen -> Statische Routingtabelle
- Route example for reaching net B via
router_location_Awith local IP192.168.111.100:ip route add 192.168.155.0/24 via 192.168.111.100
The files below should be named after the name of the VPN. Wireguard will name the VPN interface after the file.