OpenVPN

Etabliertes VPN-Protokoll

OpenVPN ist ein etabliertes VPN-Protokoll. Es ist sehr flexibel und läuft auf fast allen Plattformen.


Vorteile

Nachteile

Vergleich zu WireGuard

Eigenschaft WireGuard OpenVPN
Geschwindigkeit Sehr schnell Mittel
Code-Menge ~4.000 Zeilen ~100.000+ Zeilen
Konfiguration Einfach Komplex
Zertifikate Nicht notwendig PKI notwendig
Alter Neu (2016) Etabliert (2001)

PKI (Public Key Infrastructure)

OpenVPN benötigt Zertifikate:

Certificate Authority (CA)
     │
     ├─► Server-Zertifikat
     │
     └─► Client-Zertifikate
          ├─► Client 1
          ├─► Client 2
          └─► Client n

In OpenSense:

System → Trust → Authorities → Add
  - Create internal CA

System → Trust → Certificates → Add
  - Server Certificate
  - Client Certificates

Protokoll-Modi

UDP (Standard, Port 1194)

Vorteile:

Nachteile:

TCP (Optional, z.B. Port 443)

Vorteile:

Nachteile:

Client-Config Beispiel

client
dev tun
proto udp
remote vpn.example.com 1194

ca ca.crt
cert client.crt
key client.key

cipher AES-256-GCM
auth SHA256

comp-lzo
verb 3

In OpenSense

Setup:

1. Zertifikate erstellen
   System → Trust → Authorities/Certificates

2. OpenVPN Server konfigurieren
   VPN → OpenVPN → Servers → Add
   - Mode: Remote Access (SSL/TLS + User Auth)
   - Protocol: UDP
   - Port: 1194

3. Firewall-Regeln
   Firewall → Rules → WAN
   - Allow UDP 1194

4. Benutzer erstellen
   System → Access → Users

5. Client-Config exportieren
   VPN → OpenVPN → Client Export

Einsatzszenarien

Wann OpenVPN statt WireGuard?

  • Legacy-Systeme ohne WireGuard-Support
  • Restriktive Firewalls (TCP Port 443)
  • Bestehende Infrastruktur mit OpenVPN