Alexander's Blog

Sharing knowledge with the global IT community since November 1, 2004

Modify Default Port Number for Terminal Services/Remote Desktop

/
/
ad-mania

By default, Terminal Services (and Remote Desktop) uses TCP port 3389. If you use Remote Desktop or Terminal Services to connect to your Windows computer, you might want to consider modifying the default port for security reasons. The default port can be changed by hacking the registry. Here’s the procedure.

– Open the registry editor (regedit.exe) and go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp.

– Double-click PortNumber in the right-hand pane.

– Click on Decimal and change the Value data to a different port number that is not in use.

– Close the registry editor and reboot your computer.

This technique applies to Win2000/2003/XP. To connect to the remote computer enter the port number at the end of the domain name or IP address. For example, to connect to a domain called Contoso.com that has an IP address of 172.16.5.6 and is configured to use port number 5678, you can use either of the following in the Remote Desktop Connection:
CONTOSO.COM:5678
172.16.5.6:5678

To determine which port number to use, check out this list of TCP/IP port numbers. Port numbers 0 through 1023 are called well-known ports, while port numbers 1024 through 49151 are registered ports. You can pick a port number between 49,152 and 65,535 because these are dynamic or private ports, such as port 54321.

  • Facebook
  • Twitter
  • Linkedin

Leave a Comment

Your email address will not be published. Required fields are marked *

This div height required for enabling the sticky sidebar