16 Zeilen
758 B
PowerShell
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 |