3 ms·
Or maybe a sub-interface per peer: # ip link add dev wg0 type wireguard # wg set wg0 listen 0.0.0.0:51820 listen ::/0:51820 private-key /path/to/private-
by phragma 9y ago
Or maybe a sub-interface per peer:
# ip link add dev wg0 type wireguard
# wg set wg0 listen 0.0.0.0:51820 listen ::/0:51820 private-key /path/to/private-key
# ip link add dev wg0-peer1 type wireguard-peer
# wg set wg0-peer1 local-endpoint wg0 remote-endpoint 209.202.254.14:8172 public-key ABCDEF
Then routing via kernel:
# ip route add 192.0.2.0/24 dev wg0-peer1
And/or layer something else on top:
# ip link add link wg0-peer1 name peer1-vlan100 type vlan id 100
Perhaps enslave that to a VRF:
# ip link set peer1-vlan100 vrf blue
The peering interfaces could also be assigned an MTU that matches the path to each peer, if known:
# ip link set wg0-peer1 mtu 1328