Initialize reverse proxy and TLS workshop lab setup
This commit is contained in:
@@ -0,0 +1,118 @@
|
||||
# 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, Port `8080`)
|
||||
- `backend-a` (einfaches statisches Backend)
|
||||
- `backend-b` (einfaches statisches Backend)
|
||||
|
||||
Basisrouten nach dem Start:
|
||||
|
||||
- `http://localhost:8080/` -> Startseite
|
||||
- `http://localhost:8080/service/a` -> Backend A via Proxy
|
||||
- `http://localhost:8080/service/b` -> Backend B via Proxy
|
||||
|
||||
## WebUI Struktur
|
||||
|
||||
- `http://localhost:8080/` -> Ueberblick + Navigation
|
||||
- `http://localhost:8080/challenges.html` -> Detaillierte Challenges
|
||||
- `http://localhost:8080/hints.html` -> Hint Cheatsheet
|
||||
- `http://localhost:8080/solutions.html` -> Musterloesungen
|
||||
|
||||
## Voraussetzungen (WSL oder Linux)
|
||||
|
||||
1. Docker + Compose (`docker compose` oder `docker-compose`)
|
||||
2. Bei Windows: Docker Desktop + WSL Integration aktiv
|
||||
3. Optional fuer TLS-Challenges: `easy-rsa`, `openssl`, `wireshark`
|
||||
|
||||
## Schnellstart
|
||||
|
||||
```bash
|
||||
./scripts/bootstrap.sh
|
||||
```
|
||||
|
||||
### Start auf Windows
|
||||
|
||||
Empfohlen: ueber WSL starten (nicht nativ in PowerShell ohne WSL).
|
||||
|
||||
Option A (WSL Terminal):
|
||||
|
||||
```bash
|
||||
./scripts/bootstrap.sh
|
||||
```
|
||||
|
||||
Option B (PowerShell Wrapper):
|
||||
|
||||
```powershell
|
||||
./scripts/workshop.ps1 -Action bootstrap
|
||||
```
|
||||
|
||||
Der PowerShell-Wrapper braucht kein `make` und ruft die Linux-Skripte direkt in WSL auf.
|
||||
|
||||
Falls PowerShell das Script blockiert:
|
||||
|
||||
```powershell
|
||||
Set-ExecutionPolicy -Scope Process Bypass
|
||||
```
|
||||
|
||||
Weitere Aktionen aus PowerShell:
|
||||
|
||||
```powershell
|
||||
./scripts/workshop.ps1 -Action redeploy
|
||||
./scripts/workshop.ps1 -Action proxy-reload
|
||||
./scripts/workshop.ps1 -Action reset
|
||||
```
|
||||
|
||||
Wenn mehrere Distros installiert sind:
|
||||
|
||||
```powershell
|
||||
./scripts/workshop.ps1 -Action bootstrap -Distro Ubuntu-24.04
|
||||
```
|
||||
|
||||
Der Script:
|
||||
|
||||
- prueft Docker + Compose
|
||||
- erstellt `.env` aus `.env.example` (falls nicht vorhanden)
|
||||
- startet den Stack
|
||||
|
||||
## Neu deployen / resetten
|
||||
|
||||
```bash
|
||||
make redeploy
|
||||
make proxy-reload
|
||||
make reset
|
||||
```
|
||||
|
||||
- `redeploy`: build + restart aller Services
|
||||
- `proxy-reload`: nur Reverse Proxy restart
|
||||
- `reset`: Container/Netzwerk/Volumes aufraeumen
|
||||
|
||||
Hinweis: `make redeploy` startet zusaetzlich den Reverse Proxy neu, damit Nginx-Config-Aenderungen sicher aktiv sind.
|
||||
|
||||
## Kurz testen
|
||||
|
||||
```bash
|
||||
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`.
|
||||
Reference in New Issue
Block a user