Dateien
Hetzner-Backup/scripts/setup-firewall.ps1
2025-06-07 19:38:39 +02:00

16 Zeilen
758 B
PowerShell

# PowerShell-Script für Windows Firewall Konfiguration
# Als Administrator ausführen!
Write-Host "Konfiguriere Windows Firewall für Docker..." -ForegroundColor Green
# Firewall-Regeln für HTTP und HTTPS
New-NetFirewallRule -DisplayName "Docker HTTP" -Direction Inbound -Protocol TCP -LocalPort 80 -Action Allow -ErrorAction SilentlyContinue
New-NetFirewallRule -DisplayName "Docker HTTPS" -Direction Inbound -Protocol TCP -LocalPort 443 -Action Allow -ErrorAction SilentlyContinue
Write-Host "Firewall-Regeln erstellt." -ForegroundColor Green
# Docker-Service neustarten (optional)
Write-Host "Starte Docker-Service neu..." -ForegroundColor Yellow
Restart-Service docker
Write-Host "Fertig! Ports 80 und 443 sind jetzt offen." -ForegroundColor Green