92 lines
2.4 KiB
Markdown
92 lines
2.4 KiB
Markdown
# VPN-Routing Final Fix - Anleitung
|
|
|
|
## Problem best?tigt
|
|
|
|
? **Route vorhanden**: `10.8.0.0/24` Route existiert
|
|
? **Ping funktioniert**: `ping 10.8.0.1` erfolgreich
|
|
? **HTTP/HTTPS-Traffic kommt NICHT ?ber VPN**: Traefik sieht immer noch `ClientHost: 89.246.96.244`
|
|
|
|
## Ursache
|
|
|
|
Windows sendet HTTP/HTTPS-Traffic nicht ?ber das WireGuard-Interface, obwohl die Route vorhanden ist und Ping funktioniert. Dies deutet auf eine falsche `AllowedIPs`-Einstellung in der WireGuard-Client-Konfiguration hin.
|
|
|
|
## L?sung: WireGuard AllowedIPs pr?fen
|
|
|
|
### Schritt 1: WireGuard-Config ?ffnen
|
|
|
|
**Option A: ?ber WireGuard GUI**
|
|
1. ?ffne WireGuard
|
|
2. W?hle "grafana-test" Verbindung
|
|
3. Klicke auf "Bearbeiten"
|
|
|
|
**Option B: Config-Datei direkt**
|
|
- ?ffne: `%USERPROFILE%\Downloads\grafana-test.conf`
|
|
- Oder: Wo auch immer du die WireGuard-Config gespeichert hast
|
|
|
|
### Schritt 2: Pr?fe AllowedIPs
|
|
|
|
**Unter `[Peer]` sollte stehen:**
|
|
```ini
|
|
[Peer]
|
|
PublicKey = ...
|
|
Endpoint = 94.16.110.151:51820
|
|
AllowedIPs = 10.8.0.0/24 # ? WICHTIG: Gesamtes VPN-Netzwerk!
|
|
PersistentKeepalive = 25
|
|
```
|
|
|
|
**Falls nur steht:**
|
|
```ini
|
|
AllowedIPs = 10.8.0.1/32 # ? Nur Server-IP, nicht das Netzwerk!
|
|
```
|
|
|
|
**Dann ?ndere zu:**
|
|
```ini
|
|
AllowedIPs = 10.8.0.0/24 # ? Gesamtes VPN-Netzwerk
|
|
```
|
|
|
|
### Schritt 3: WireGuard neu verbinden
|
|
|
|
1. **Disconnect** WireGuard-Verbindung
|
|
2. **Warte 5 Sekunden**
|
|
3. **Connect** WireGuard-Verbindung neu
|
|
4. **Pr?fe Route**: `route print | findstr "10.8"`
|
|
5. **Teste Ping**: `ping 10.8.0.1`
|
|
|
|
### Schritt 4: Teste Grafana-Zugriff
|
|
|
|
1. **DNS-Cache leeren**: `ipconfig /flushdns`
|
|
2. **Browser ?ffnen** (oder Inkognito-Modus)
|
|
3. **?ffne**: `https://grafana.michaelschiemer.de`
|
|
4. **Warte 5 Sekunden**
|
|
|
|
### Schritt 5: Logs pr?fen
|
|
|
|
Ich pr?fe dann die Traefik-Logs:
|
|
- ? Wenn `ClientHost: 10.8.0.7` ? Traffic kommt ?ber VPN!
|
|
- ? Wenn `ClientHost: 89.246.96.244` ? Traffic kommt immer noch nicht ?ber VPN
|
|
|
|
## Alternative: Route manuell optimieren
|
|
|
|
Falls AllowedIPs korrekt ist, aber es trotzdem nicht funktioniert:
|
|
|
|
```powershell
|
|
# Als Administrator
|
|
# Entferne alte Route
|
|
route delete 10.8.0.0 MASK 255.255.255.0
|
|
|
|
# Setze Route explizit mit Gateway 10.8.0.1
|
|
route add 10.8.0.0 MASK 255.255.255.0 10.8.0.1 METRIC 1 IF 18
|
|
|
|
# Pr?fe ob es funktioniert hat
|
|
route print | findstr "10.8"
|
|
```
|
|
|
|
Dann teste Grafana erneut.
|
|
|
|
## N?chste Schritte
|
|
|
|
Nach erfolgreichem VPN-Routing:
|
|
1. ? Traffic kommt ?ber VPN (`ClientHost: 10.8.0.7`)
|
|
2. ? Tempor?re IP-Erlaubnis (`89.246.96.244`) entfernen
|
|
3. ? Grafana ist nur noch ?ber VPN erreichbar
|