Using the default port 3389 is a dangerous thing when you enable remote connections to the Windows operating system, and usually we change it to a more unique port so that the target system does not directly expose the Remote Desktop Connection to the network environment.
Step 1: Open "Start → run" and enter "regedit" to open the Registry Editor:
[Hkey_local_machine/system/currentcontrolset/control/terminalserver/wds/rdpwd/tds/tcp], Change the value of the Portnamber from the default 3389 to the target port number;
Step 2:
Modify [Hkey_local_machine/system/currentcontrolset/control/terminalserver/winstations/rdp-tcp], Change the value of PortNumber from the default of 3389 to the target port number;
Step 3:
Modify [Hkey_local_machine/system/currentcontrolset/services/sharedaccess/defaults/firewallpolicy/firewallrules], Change the value of the REMOTEDESKTOP-IN-TCP to the target port number;
Step 4:
Modify [Hkey_local_machine/system/currentcontrolset/services/sharedaccess/parameters/firewallpolicy/firewallrules], Change the default value of Remotedesktop-in-tcp 3389 to the target port number;
After completing the above 4 steps, reboot the target system and you can telnet to the target machine on the newly set port. If the LAN network through the router users, also need to set the forwarding rules on the router, the operation of the router is relatively simple, do not introduce.
Win7, win8 modify the Remote Desktop Connection default port