sabato 15 ottobre 2022

Cambiare porta RDP

 UI

  1. Regedit
  2. HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
  3. Modificare PortNumber
  4. Riavviare pc

PowerShell (come admin)

cambio porta regedit
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\
Terminal Server\WinStations\RDP-Tcp' -name "PortNumber" -Value xxxx 

apertura porta firewall windows
New-NetFirewallRule -DisplayName 'RDP PORT TCP-In' -Profile 'Any'
-Direction Inbound -Action Allow -Protocol TCP -LocalPort xxxx 

New-NetFirewallRule -DisplayName 'RDP PORT UDP-In' -Profile 'Any'
-Direction Inbound -Action Allow -Protocol UDP -LocalPort xxxx

Restart-Service TermService -Force

Verifica porta
Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "PortNumber"

Aprire la nuova porta sul firewall aziendale e connettersi usando ip:porta

Nessun commento:

Posta un commento