Windows modifies the remote port number
In the start-run menu, enter regedit, enter the registry editor, and follow the previous path to enter the modified port.
HKEY_LOCAL_MACHINE/System/CurrentControlSet/Control/Terminal Server/WinStations/RDP-Tcp
Find the "PortNumber" below and display it in decimal mode. The default is 3389, which is changed to any available port.
Please note that after the modification here, the modification has not been successful, and the other location of the registry file must be modified accordingly, the path is
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Terminal Server/Wds/rdpwd/Tds/tcp
Find the PortNumber below, display it in decimal mode, and make changes.
Then find 2012windows Firewall Advanced Management-Select inbound rules-remote Desktop user Mode (TCP-IN)
Select, create a new rule-Port-apply to TCP, specific local port, fill in the port number you just modified-allow connection, and then all the next step. When it comes to the name, you can choose your own remote Desktop * * port.
Run enter services.msc to find the following service to restart
Restart Remote Desktop Services. After rebooting, the remote is offline.