3.7 KiB
HTL Workshop - Reverse Proxy & TLS Lab
Dieses Repo ist ein leichtes HTTP-Basissetup fuer einen Workshop mit Fokus auf:
- Reverse Proxy Grundlagen (Nginx)
- Routing auf mehrere Backends
- TLS/HTTPS manuell umsetzen (z. B. Easy-RSA)
- Security-Hardening im Proxy
Die Aufgaben sind absichtlich auf manuelle Konfiguration ausgelegt, nicht auf App-Entwicklung.
Architektur
reverse-proxy(Nginx, Port8080)backend-a(einfaches statisches Backend)backend-b(einfaches statisches Backend)
Basisrouten nach dem Start:
http://localhost:8080/-> Startseitehttp://localhost:8080/service/a-> Backend A via Proxyhttp://localhost:8080/service/b-> Backend B via Proxy
WebUI Struktur
http://localhost:8080/-> Ueberblick + Navigationhttp://localhost:8080/challenges.html-> Detaillierte Challengeshttp://localhost:8080/hints.html-> Hint Cheatsheethttp://localhost:8080/solutions.html-> Musterloesungen
Voraussetzungen
Windows (empfohlen)
Installiere die erforderlichen Tools mit winget:
winget install --id Microsoft.VisualStudioCode -e
winget install --id Git.Git -e
winget install --id Docker.DockerDesktop -e
Optional fuer TLS-Challenges:
winget install --id OpenSSL.OpenSSL -e
winget install --id WiresharkFoundation.Wireshark -e
Nach der Installation von Docker Desktop aktiviere die WSL-Integration in den Einstellungen.
Linux / macOS
Docker Engine oder Docker Desktop installieren (falls make fehlt auf macOS: xcode-select --install).
Optional fuer TLS-Challenges:
Ubuntu/Debian (apt)
sudo apt update
sudo apt install easy-rsa openssl wireshark
Fedora/RHEL (dnf)
sudo dnf install easy-rsa openssl wireshark
Schnellstart
Windows
./scripts/workshop.ps1 -Action bootstrap
Falls PowerShell das Script blockiert:
Set-ExecutionPolicy -Scope Process Bypass
Alternativ im WSL-Terminal:
./scripts/bootstrap.sh
Linux / macOS
./scripts/bootstrap.sh
Das Skript:
- prueft Docker + Compose
- erstellt
.envaus.env.example(falls nicht vorhanden) - startet den Stack
Hinweis zu Skriptnamen:
scripts/bootstrap.shist der empfohlene Einstieg- intern nutzt es
scripts/bootstrap-unix.sh scripts/bootstrap-wsl.shexistiert nur noch als Kompatibilitaets-Wrapper
Neu deployen / resetten
Windows
Weitere Aktionen in PowerShell:
./scripts/workshop.ps1 -Action redeploy
./scripts/workshop.ps1 -Action proxy-reload
./scripts/workshop.ps1 -Action reset
./scripts/workshop.ps1 -Action reset-hard
./scripts/workshop.ps1 -Action reset-origin
Wenn mehrere Distros installiert sind:
./scripts/workshop.ps1 -Action bootstrap -Distro Ubuntu-24.04
Linux / macOS
make redeploy
make proxy-reload
make reset
make reset-hard
make reset-origin
redeploy: build + restart aller Servicesproxy-reload: nur Reverse Proxy restartreset: Container/Netzwerk/Volumes aufraeumenreset-hard: wiereset, plus lokale Git-Aenderungen verwerfen (falls Git-Repo)reset-origin: wiereset-hard, aber bevorzugt Ruecksetzen auforigin/main
Hinweis: make redeploy startet zusaetzlich den Reverse Proxy neu, damit Nginx-Config-Aenderungen sicher aktiv sind.
Kurz testen
curl http://localhost:8080/service/a
curl http://localhost:8080/service/b
Fokus im Workshop
Die Basis ist bewusst nur HTTP. HTTPS ist Teil der Aufgaben:
- CA + Server-Zertifikat selbst erstellen
- Nginx auf 443 erweitern
- Root-CA importieren
- HSTS und TLS-Haertung umsetzen
- TLS mitschneiden und analysieren
Vollstaendige TLS-Beispielkonfiguration mit HSTS: proxy/nginx.tls.example.conf.