微软文档
Change the listening port for Remote Desktop on your computer
https://docs.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/change-listening-port
Applies to:
Windows 10, Windows 8.1, Windows 8,
Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2008 R2
- Start the registry editor. (Type regedit in the Search box.)
- Navigate to the following registry subkey: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
- Find PortNumber
- Click Edit > Modify, and then click Decimal.
- Type the new port number, and then click OK.
- Close the registry editor, and restart your computer.
复制代码
You can also change the RDP port by running the following PowerShell command.
In this command, we'll specify the new RDP port as 3390.
To add a new RDP Port to the registry:
- Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "PortNumber" -Value 3390
- New-NetFirewallRule -DisplayName 'RDPPORTLatest' -Profile 'Public' -Direction Inbound -Action Allow -Protocol TCP -LocalPort 3390
复制代码
看起来就两个步骤
1. 改端口
2. 改防火墙 |