Special offer
popup-offers
English
+370 5 205 5502 sales@monovm.com

How to Change RDP port in Windows

The full form of RDP is the Remote Desktop connection, an essential feature for many users for setting up the remote access port to the computer. However, changing the RDP port can also create some issues in maintaining the usual working devices. 

25 Dec, 18 by Sophia H 5 min Read

How to change RDP Port in Windows 10, 2019, 2016, 2012

When you connect to a remote computer (either a Windows client or Windows Server) through the Remote Desktop connection, the Remote Desktop feature on your computer "hears" the connection through a listening port (3389 by default). You can change that listening port on Windows computers by modifying the registry. In this article, we are going to change the RDP port used in remote desktop access.

 

How to change RDP Port in Windows 10 [Updated for 2021]

We have divided all procedures into three separate sections, each with their own steps so that you can easily understand and follow them on your system. 

 

How to Change RDP Port in Windows 10 Using Windows Registry

In Windows, the Windows Registry works as a configuration settings database for installed apps, Windows services, etc.  Windows Registry is the best way to change the default RDP port from 3389 to the desired custom port. 

Step 1: First, right-click on the start menu and click on the Run option, or you can use Windows and R keys on the keyboard to open the Run utility. Then, type the regedit and press OK to launch Windows Registry Editor. 

Step 2: In the Windows Registry Editor, go in the locate and click on the following registry folder: 

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp

Step 3: After that, double-click on the PortNumber in the RDP-TCP folder. 

Step 4: Select the Decimal option in the Edit DWORD(32-bit) value box and type a new port number. You can select the values between 1 and 65353.  

Important Note: You have to make sure that the values don't match any common ports, so if you select a common port (like port 80 for the web traffic), then you can't establish the Remote Desktop connection afterward. 

Step 5: At last, press OK to save the changes and restart the system to make changes successfully. 

 

Connect to a Remote Desktop with a Custom RDP Port

Step 1: Open the run utility by pressing Windows and R keys, then type mstsc and press Enter button. If you are using Windows 10, you can also simply type RDP into the Windows search bar.

Step 2: Now provide a specific IP address of the remote server and a new port number in a "Remote Desktop Connection" window, then press Enter button to begin the connection. It should be written in the following format: serveripaddress:customport. For our example, we used port 2020.

 

Configure Windows Firewall for Custom RDP Port

Step 1: Open the Run utility using Win+R and type wf.msc, then click the press Enter button. This command will open the Windows Firewall management options in which you can add a new firewall rule.

Step 2: Now select inbound rules in the Windows Firewall MMC menu.  After selecting these values, select a new rule by Actions Panel on the right. 

Step 3: After that, select Port from the options list in the new Inbound Rule window. Then click on Next.

Step 4: As we are creating a custom rule for UDP and TCP ports, so first select TCP, then select Specific Local Ports, type in the custom RDP port you chose in section one and click Next.

Step 5: Select Allow the connection and press Next to continue. 

Step 6: Now, leave all of the entries selected for full access except for Public to prevent establishing the Remote Desktop Connection on a public network. Then, click on the Next to continue. 

Step 7: Finally, provide the new network rule name with the description in the appropriate text boxes and click on the Finish button to add a new rule. 

Step 8: Repeat steps 1 through 7 of this section but select TCP in step 4 and restart the system to make the changes. 

 

Conclusion

We have tested this article’s methods on Windows 7 Enterprise, Windows 7 Professional, Microsoft Windows 10 Professional, Microsoft Windows Server 2003 Standard Edition, Windows Server 2008, and Windows Server 2012. We have included three different methods to change RDP ports in Windows 10 easily, and if you face any issue while using one method, then you can switch to another to change the RDP port easily. 

If you like our given information, then please visit our MonoVM website for more informative blogs and hosting-related services.  

Sophia H

My name is Sophia H. My degree is MS in Information Technology Engineering. I have been working for 5 years on Java developing (j2ee), Computer Networking (Optical Networks), Virtualization and Hosting.