82 — VPN-Referenz (OpenVPN + WireGuard)
Stand: 2026-04-01
Uebersicht VPN-Tunnel
| Tunnel | Typ | Von | Nach | IPs | Zweck |
|---|---|---|---|---|---|
| VPS → CK-Netz | OpenVPN (TCP) | sck-debian-nbg | vpn.creative-kirche.de:7443 | 10.244.2.2 | Monitoring Standorte, Salto, SNMP |
| Pi5 → CK-Netz | OpenVPN (TCP) | raspip5 | vpn.creative-kirche.de:7443 | 10.244.2.3 | Split-Tunnel, NAT/MASQUERADE fuer Home-Netz |
| VPS ↔ Pi5 | WireGuard (UDP) | 178.104.125.96:51820 | raspip5 (DS-Lite) | 10.100.0.1 ↔ 10.100.0.2 | Prometheus Scraping, SSH, Datenaustausch |
Nicht mehr aktiv
| Tunnel | Status | Ersetzt durch |
|---|---|---|
| rpp1 → CK-Netz | Noch aktiv, wird abgeloest | Pi5 OpenVPN (seit 28.03.2026) |
WireGuard (VPS ↔ Pi5)
VPS (sck-debian-nbg) — Server
Interface: wg0
Address: 10.100.0.1/24
ListenPort: 51820
MTU: 1280
Public Key: o+JzlSjV7N5FLZC7RgkB1uYXTae5F9x3FA1u5PEfsxo=
Peer: Pi5
Public Key: p9If+iqV8eGWVmO8mAlOS5iB6znU+p9KO1x5o++nRHk=
AllowedIPs: 10.100.0.2/32
PersistentKeepalive: 25
Config: /etc/wireguard/wg0.conf
Service: wg-quick@wg0.service
Pi5 (raspip5) — Client
Interface: wg0
Address: 10.100.0.2/24
MTU: 1280
Peer: VPS
Public Key: o+JzlSjV7N5FLZC7RgkB1uYXTae5F9x3FA1u5PEfsxo=
Endpoint: 178.104.125.96:51820
AllowedIPs: 10.100.0.1/32
PersistentKeepalive: 25
Config: /etc/wireguard/wg0.conf
Service: wg-quick@wg0.service
Warum WireGuard?
Pi5 hat DS-Lite (kein oeffentliches IPv4). WireGuard baut den Tunnel von Pi5 nach aussen zum VPS auf. Der VPS kann dann ueber 10.100.0.2 den Pi5 erreichen (Prometheus Scraping, SSH).
Troubleshooting
# Status pruefen
sudo wg show
# Handshake-Alter pruefen (sollte < 2 Min sein)
sudo wg show wg0 latest-handshakes
# Neustart
sudo systemctl restart wg-quick@wg0
OpenVPN (VPS → CK-Netz)
VPS — Full Tunnel
Service: openvpn-client@ck-vpn.service
Config: /etc/openvpn/client/ck-vpn.conf
Protokoll: TCP
VPN-IP: 10.244.2.2
Gateway: 10.244.2.1
Routen ueber tun0:
| Netz | Beschreibung |
|---|---|
| 10.128.20.0/24 | WLAN-Netz (extern) |
| 10.128.30.0/24 | Standort B (Ruhrstr.) |
| 10.128.40.0/24 | Standort A (Pferdebachstr.) |
| 10.128.50.0/24 | Gaeste-Netz |
| 10.244.2.0/24 | VPN-Netz |
VPN-Endpunkt: vpn.creative-kirche.de:7443 (Sophos SSL-VPN)
Pi5 — Split Tunnel
Service: openvpn-client@sck.service
Config: /etc/openvpn/client/sck.conf
Protokoll: TCP
VPN-IP: 10.244.2.3
Modus: Split-Tunnel (route-nopull + explizite Routen)
Nur diese Netze gehen ueber VPN: - 10.128.20.0/24, 10.128.30.0/24, 10.128.40.0/24, 10.128.50.0/24, 10.244.2.0/24
NAT/MASQUERADE: Pi5 macht NAT fuer das Home-Netz (192.168.178.0/24), damit Geraete im LAN ueber den Pi5 ins CK-Netz koennen.
rpp1 (192.168.178.67) — Legacy, wird abgeloest
Service: openvpn (client.conf)
VPN-IP: 10.244.2.130
Modus: Full Tunnel (0.0.0.0/1 + 128.0.0.0/1)
NAT/MASQUERADE: Ja
Hinweis: rpp1 soll nach Standort A umziehen (Phase 3+4 Netzwerk-Migration). Bis dahin laeuft er parallel zum Pi5 als Fallback.
Erreichbarkeit ueber VPN
Vom VPS erreichbar (ueber OpenVPN tun0)
| Ziel | IP | Dienst |
|---|---|---|
| Sophos XGS 40.1 | 10.128.40.1 | SNMP, API (4444), Syslog |
| Sophos XGS 30.1 | 10.128.30.1 | SNMP, API (4444), Syslog |
| SaltoServer | 10.128.40.6 | SSH, SNMP-Exporter (9116), Blackbox (9115), Metrics (18101) |
| WLAN APs 40er | 10.128.40.31-43 | SNMP |
| WLAN APs 30er | 10.128.30.31-38 | SNMP |
Vom VPS erreichbar (ueber WireGuard wg0)
| Ziel | IP | Dienst |
|---|---|---|
| Pi5 | 10.100.0.2 | SSH, Node-Exporter (9100), Sungrow (9789), FritzBox (9787), Blackbox (9115), Pi-hole (8080) |
Vom Pi5 erreichbar (ueber OpenVPN tun0)
| Ziel | IP | Dienst |
|---|---|---|
| Alle CK-Standorte | 10.128.x.x | via NAT |
SSH-Kette: VPS → Mac
Der Mac (192.168.178.72) ist nur ueber ProxyJump erreichbar:
ssh mac # nutzt ~/.ssh/config: ProxyJump raspip5
scp mac:~/datei /tmp/ # funktioniert genauso
Zertifikate und Keys
| System | Zertifikat/Key | Ablauf |
|---|---|---|
| VPS OpenVPN | Embedded in ck-vpn.conf (CA + Client Cert) | CA gueltig bis 31.12.2036 |
| Pi5 OpenVPN | Embedded in sck.conf (CA + Client Cert) | CA gueltig bis 31.12.2036 |
| VPS WireGuard | Private Key in wg0.conf | Kein Ablauf (Curve25519) |
| Pi5 WireGuard | Private Key in wg0.conf | Kein Ablauf (Curve25519) |
Achtung: OpenVPN-Zertifikate werden ueber die Sophos XGS verwaltet (VPN Portal). Bei Erneuerung: neues .ovpn-Profil herunterladen und Config aktualisieren.
Troubleshooting
VPN-Verbindung pruefen
# OpenVPN Status
systemctl status openvpn-client@ck-vpn # VPS
systemctl status openvpn-client@sck # Pi5
# WireGuard Status
sudo wg show
# Ziel erreichbar?
ping -c 1 10.128.40.1 # Sophos XGS
ping -c 1 10.100.0.2 # Pi5 via WG
# Routen pruefen
ip route | grep tun0
ip route | grep wg0
Haeufige Probleme
| Problem | Ursache | Fix |
|---|---|---|
| tun0 weg, keine CK-Netze | OpenVPN disconnected | sudo systemctl restart openvpn-client@ck-vpn |
| wg0 kein Handshake | Pi5 offline oder NAT-Problem | Pi5 pruefen, ggf. sudo systemctl restart wg-quick@wg0 auf Pi5 |
| Mac nicht erreichbar | Direkter SSH statt ProxyJump | ssh mac (nicht ssh 192.168.178.72) |
| Standort B nicht erreichbar | Site-to-Site VPN zwischen Sophos down | In Sophos Central pruefen |
Erstellt: 01.04.2026 | Quellen: /etc/wireguard/wg0.conf, /etc/openvpn/client/, ip route, wg show