Windows servers are remotely accessible with Remote Desktop via the TCP 3389 port (default port). If you need to change the remote access port, this article explains how to proceed. Firstable need connect to your server via Remote Desktop. Click simultaneously on the Windows logo + R to open the “Run” dialog and enter the “regedit” command.
Serch for this registry subkey. You can find use this way: HKEY_LOCAL_MACHINE -> SYSTEM -> CurrentControlSet -> Control -> Terminal Server -> WinStations -> RDP-Tcp:
Double-click on the “PortNumber” registry subkey, select decimal base and type the port number of your choice (default port is 3389). Click “OK” to save your settings.
When choosing new port for connection remember, that exist some ports categories:
-
Numbers from 0 to 10213 — known ports which appoint and control IANA organization (Internet Assigned Numbers Authority). Usually they are using difference's OS application systems.
-
Numbers from 1024 to 49151 — registered ports, appointed by IANA. They can use for private task solving.
-
Numbers from 49152 to 65535 — dynamic private ports which can used by any applications or processes for work task solving.
After port changing for remote connection, don't forget create a new rule for this port in Windows Firewall.
Important: If you don't do that, you can't connect by using RDP.
New rule creation.
Choose rule for port.
Choosing type of TCP protocol and write a port, which we are set before (In example: number of port is 60001).
In the next step need to choose action. You need to allow the connection.
Further specify the profiles for which this rule applies.
Final step – write a name for rule.
Reboot server.
Now your server connection via RDP using a new port. Don't forget, that port need to write after IP address, for example: 185.155.99.99:60001