Saturday, 11 March 2017

Changing the default RDP port in windows

Follow these steps to change the default Remote Desktop server port:
  1. Open up Registry Editor by clicking on the Start Button, type in regedit and then hit Enter.
  2. In Registry Editor, navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp. 
  3. Right click on the PortNumber dword and select Modify. 
  4. Change the base to Decimal and enter a new port between 1025 and 65535 that is not already in use.
  5. Click OK and reboot.


Keep in mind that the next time when you want to connect to your system with RDP you will need to provide the port number.  You can do that from the Remote Desktop client by appending a colon after the host name or ip address followed by the port number.  For example, if I have a computer with host name of myserver with RDP running on port 3355 I would use myserver:3355 in the remote desktop client hostname field.