Tuesday 31 December 2019

Change the remote desktop port on server/desktop

RDP(Remote Desktop Protocol) is a proprietary protocol developed by Microsoft. When you connect the computer, the remote desktop feature  "listen" the connection request by default on port 3389.

You can change the RDP listening port on Windows computers/servers by modifying the registry. Use the below steps to change the default RDP port.
  • Start the registry editor (Type regedit in the Search box.) or type regedit in Run and click on OK.
  • Navigate to the following registry subkey:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\PortNumber
  • Click Edit > Modify, and then click Decimal
  • Type the new port number above 1024, and then click OK. 
  • Close the registry editor, and restart your computer/server.
After a restart, you may connect using the new RDP Port. If the firewall is running, make sure to configure your firewall to allow connections to the new port number. 

To connect the RDP using the new port, you need to enter IPADDRESS:PORT in computer address.

For security reasons, it's better to change the default RDP port and whitelist the IP address in your firewall for the RDP connection.