Knowledge Base
MilesWeb / How-Tos

How to change the listening port for Remote Desktop?

Approx. read time : 3 min

Watch this video for a step by step process on How to change the listening port for Remote Desktop

Summary

Port 3389 is the home of the remote desktop protocol used by all recent versions of Windows to enable Remote Desktop Services. If you have Remote Desktop enabled on your machine, it is listening on port 3389 for connections. 

It is recommended to change the default RDP port to protect your system from bots and script kiddies.

You can change the listening port on Windows computers by modifying the registry.

Steps to change the Remote Desktop server port:

1] Type Regedit in the Search box and start the registry editor by clicking on the regedit editor icon.

2] Navigate to HKEY_LOCAL_MACHINE> SYSTEM> CurrentControlSet> Control> Terminal Server> WinStations> RDP-Tcp, in Registry Editor.

3] Click on RDP-Tcp, and you will see PortNumber on the right side of the window panel. 

4] Now, Right-click on the PortNumber and select Modify

5] Change the Base to Decimal and enter a new port between 1025 and 65535 that is not already in use.

6] Click OK and reboot.

The new port must be entered the next time you connect to this machine using the Remote Desktop connection. If you use a firewall, be sure to set it to allow connections to the new port number.

PowerShell command to check the current port:

For Example:

You can also modify the RDP port by performing the PowerShell code below. In this command, the new port number provided is 3390.

And that’s how you change the listening port for the remote desktop on your computer.

Prajakta is a content writer at MilesWeb. She is ardent about writing technical and non-technical blogs. Adding value to know-how is what she believes in. She also has good experience in educational field. Gratified in sharing knowledge.
Need help? We’re always here for you.