In this guide, I will show you how to change a default RPD port.

When you connect to a computer (either a Windows client or Windows Server) through the Remote Desktop client, the Remote Desktop feature on your computer “hears” the connection request through a defined listening port (3389 by default). You can change that listening port on Windows computers by modifying the registry.

Change RDP port

1. Start the registry editor (Type regedit in the Search box) 

How to change the remote desktop RDP port - Image 1

2. Navigate to the following registry subkey: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\PortNumber

How to change the remote desktop RDP port - Image 2

3. Click Edit > Modify, and then click Decimal. 

4. Type the new port number, and then click OK.

5. Close regedit.

Firewall configuration

1. Open Windows Firewall with Advanced Security (Type firewall in the Search box) 

How to change the remote desktop RDP port - Image 3

2. Right-hand click on Inbound Rules or Outbound Rules to create a New Rule.

How to change the remote desktop RDP port - Image 4

3. Select the Port option.

How to change the remote desktop RDP port - Image 5

4. Choose the type of connection to apply and enter a new port.


How to change the remote desktop RDP port - Image 6

5. Select allow the connection.

How to change the remote desktop RDP port - Image 7

6. Select the boxes to apply the rule.

How to change the remote desktop RDP port - Image 8

7. Name your new rule.

How to change the remote desktop RDP port - Image 9

8. Hit the button Finish and your port is opened.

9. Now restart your computer and connect with a new port.

Testing the connection

How to change the remote desktop RDP port - Image 10

As you can see, the port has been successfully changed.