-------------------- |Client 2 | |Router mit Wireguard| | | -------------------- | | | | | | -------------------- ---------------------- -------------------- |Client 4 |<------------------|Client 1 / Zentrale | |Client 3 ||Router mit Wireguard|------------------>|OPNsense mit Wireguard|----------------------|Router mit Wireguard||(Fritzbox) | | | | | -------------------- ---------------------- -------------------- | | | | | | ----------------------- |Client 5 | |weiterer Client | |(Architektur unbekannt)| -----------------------
umask 077; wg genkey | tee privatekey | wg pubkey > publickeywg genpsk > presharedkey
cd /etc/wireguardsudo nano /etc/wireguard/wg0.conf
[Interface]Address = 172.16.99.1/28ListenPort = 54321PrivateKey =[Peer]PresharedKey =PublicKey =Endpoint = 10.10.10.10:12345 #(die lokale IP des entfernen Rechners)AllowedIPs = 172.16.255.0/28 #(das Tunnelnetzwerk)
[Interface]Address = 172.16.99.2/28ListenPort = 12345PrivateKey =[Peer]PresharedKey =PublicKey =Endpoint = 10.10.10.11:54321AllowedIPs = 172.16.255.0/28
ip link set up dev wg0wg-quick up /etc/wireguard/wg0.confFür Autostart beim booten:systemctl enable wg-quick@wg0