Initial commit
Dieser Commit ist enthalten in:
38
scripts/reset-to-dhcp.ps1
Normale Datei
38
scripts/reset-to-dhcp.ps1
Normale Datei
@ -0,0 +1,38 @@
|
||||
# PowerShell Script zum Zurücksetzen auf DHCP
|
||||
# MUSS ALS ADMINISTRATOR AUSGEFÜHRT WERDEN!
|
||||
|
||||
Write-Host "=== Zurücksetzen auf DHCP (automatische IP) ===" -ForegroundColor Green
|
||||
|
||||
# Aktive WLAN-Adapter finden
|
||||
$adapters = Get-NetAdapter | Where-Object {$_.Status -eq 'Up' -and ($_.Name -like '*WLAN*' -or $_.Name -like '*Wi-Fi*')}
|
||||
|
||||
if ($adapters.Count -eq 0) {
|
||||
Write-Host "Kein aktiver WLAN-Adapter gefunden!" -ForegroundColor Red
|
||||
exit
|
||||
}
|
||||
|
||||
# Den ersten aktiven WLAN-Adapter nehmen
|
||||
$adapter = $adapters[0]
|
||||
Write-Host "`nSetze Adapter zurück auf DHCP: $($adapter.Name)" -ForegroundColor Cyan
|
||||
|
||||
# Statische IP entfernen
|
||||
Write-Host "`nEntferne statische IP-Konfiguration..." -ForegroundColor Yellow
|
||||
Remove-NetIPAddress -InterfaceIndex $adapter.InterfaceIndex -AddressFamily IPv4 -Confirm:$false -ErrorAction SilentlyContinue
|
||||
Remove-NetRoute -InterfaceIndex $adapter.InterfaceIndex -AddressFamily IPv4 -Confirm:$false -ErrorAction SilentlyContinue
|
||||
|
||||
# DHCP aktivieren
|
||||
Write-Host "`nAktiviere DHCP..." -ForegroundColor Green
|
||||
Set-NetIPInterface -InterfaceIndex $adapter.InterfaceIndex -Dhcp Enabled
|
||||
|
||||
# DNS auf automatisch setzen
|
||||
Write-Host "`nSetze DNS auf automatisch..." -ForegroundColor Green
|
||||
Set-DnsClientServerAddress -InterfaceIndex $adapter.InterfaceIndex -ResetServerAddresses
|
||||
|
||||
Write-Host "`n✅ Fertig! Der Adapter nutzt jetzt wieder DHCP (automatische IP-Vergabe)" -ForegroundColor Green
|
||||
|
||||
# Kurz warten
|
||||
Start-Sleep -Seconds 3
|
||||
|
||||
# Neue IP anzeigen
|
||||
Write-Host "`nNeue IP-Adresse:" -ForegroundColor Yellow
|
||||
Get-NetIPAddress -InterfaceIndex $adapter.InterfaceIndex -AddressFamily IPv4 | Format-Table IPAddress, PrefixLength
|
||||
54
scripts/set-static-ip.ps1
Normale Datei
54
scripts/set-static-ip.ps1
Normale Datei
@ -0,0 +1,54 @@
|
||||
# PowerShell Script für statische IP-Konfiguration
|
||||
# MUSS ALS ADMINISTRATOR AUSGEFÜHRT WERDEN!
|
||||
|
||||
Write-Host "=== Statische IP 192.168.178.88 einrichten ===" -ForegroundColor Green
|
||||
|
||||
# Aktive WLAN-Adapter finden
|
||||
$adapters = Get-NetAdapter | Where-Object {$_.Status -eq 'Up' -and ($_.Name -like '*WLAN*' -or $_.Name -like '*Wi-Fi*')}
|
||||
|
||||
if ($adapters.Count -eq 0) {
|
||||
Write-Host "Kein aktiver WLAN-Adapter gefunden!" -ForegroundColor Red
|
||||
exit
|
||||
}
|
||||
|
||||
Write-Host "`nGefundene WLAN-Adapter:" -ForegroundColor Yellow
|
||||
$adapters | Format-Table Name, Status, InterfaceIndex
|
||||
|
||||
# Den ersten aktiven WLAN-Adapter nehmen
|
||||
$adapter = $adapters[0]
|
||||
Write-Host "`nKonfiguriere Adapter: $($adapter.Name)" -ForegroundColor Cyan
|
||||
|
||||
# Aktuelle Konfiguration anzeigen
|
||||
Write-Host "`nAktuelle IP-Konfiguration:" -ForegroundColor Yellow
|
||||
Get-NetIPAddress -InterfaceIndex $adapter.InterfaceIndex -AddressFamily IPv4 | Format-Table IPAddress, PrefixLength
|
||||
|
||||
# Alte IP-Konfiguration entfernen
|
||||
Write-Host "`nEntferne alte IP-Konfiguration..." -ForegroundColor Yellow
|
||||
Remove-NetIPAddress -InterfaceIndex $adapter.InterfaceIndex -AddressFamily IPv4 -Confirm:$false -ErrorAction SilentlyContinue
|
||||
Remove-NetRoute -InterfaceIndex $adapter.InterfaceIndex -AddressFamily IPv4 -Confirm:$false -ErrorAction SilentlyContinue
|
||||
|
||||
# Neue statische IP setzen
|
||||
Write-Host "`nSetze neue statische IP: 192.168.178.88" -ForegroundColor Green
|
||||
New-NetIPAddress -InterfaceIndex $adapter.InterfaceIndex -IPAddress "192.168.178.88" -PrefixLength 24 -DefaultGateway "192.168.178.1" -AddressFamily IPv4
|
||||
|
||||
# DNS-Server setzen (FRITZ!Box und Google)
|
||||
Write-Host "`nSetze DNS-Server..." -ForegroundColor Green
|
||||
Set-DnsClientServerAddress -InterfaceIndex $adapter.InterfaceIndex -ServerAddresses "192.168.178.1", "8.8.8.8"
|
||||
|
||||
# Neue Konfiguration anzeigen
|
||||
Write-Host "`nNeue IP-Konfiguration:" -ForegroundColor Green
|
||||
Get-NetIPAddress -InterfaceIndex $adapter.InterfaceIndex -AddressFamily IPv4 | Format-Table IPAddress, PrefixLength
|
||||
Get-NetRoute -InterfaceIndex $adapter.InterfaceIndex -DestinationPrefix "0.0.0.0/0" | Format-Table DestinationPrefix, NextHop
|
||||
|
||||
Write-Host "`n✅ Fertig! Ihre IP ist jetzt: 192.168.178.88" -ForegroundColor Green
|
||||
Write-Host "Die FRITZ!Box Port-Weiterleitung sollte jetzt funktionieren!" -ForegroundColor Green
|
||||
|
||||
# Test
|
||||
Write-Host "`nTeste Internetverbindung..." -ForegroundColor Yellow
|
||||
Test-NetConnection google.com -Port 80 -InformationLevel Quiet
|
||||
|
||||
if ($?) {
|
||||
Write-Host "✅ Internetverbindung funktioniert!" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "❌ Keine Internetverbindung - prüfen Sie die Einstellungen!" -ForegroundColor Red
|
||||
}
|
||||
16
scripts/setup-firewall.ps1
Normale Datei
16
scripts/setup-firewall.ps1
Normale Datei
@ -0,0 +1,16 @@
|
||||
# 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
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren