How to change default RDP (remote desktop) Port

To better protect your windows server, it might be necessary to change the default RDP Port from 3389 to something different. To change this, please follow the below steps.

Note: This will work on pretty much any version of windows, but keep in mind, server 2008 is EOL. Please consider upgrading to the latest version for security fixes and better functionality.

Registry Changes


  1. Start Registry Editor.
  2. Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\PortNumber;
  3. On the Edit menu, click Modify, and then click Decimal.Type the new port number, and then click OK;
  4. Save and close RegEditor;

This now concludes the changing of the port, but we now need to change some firewall settings to allow connections on the new port. To do this follow the below instructions:

Allowing new port through windows firewall


  1. On Windows Firewall which is located via the Control Panel, click on the Advanced Settings option on the left..
  2. In the Windows Firewall with Advanced Security window that opens, click on the Inbound Rules on the left;
  3. Click on the New Rule on the right side of the window;
  4. Select Port on the list of options (i.e. 1234);
  5. Select TCP (or UDP if that is what you require) and Specific local ports, and then write your ports in the text box to the right of Specific local ports (i.e. 1234);
  6. Select Allow the connection in the next window;
  7. Select the options which you need from Domain, Private, Public (private and public are the network types that you select when you connect to the new network, and windows asks you to select the network type, and domain is obviously your domain);
  8. Finally, write a Name and Description in the window that shows next. Click FINISH;
  9. Restart the computer;

Note: If for some reason you are unable to connect after these changes, you can always load the console from your customer panel and you will be presented with a live view of the system. This where you can revert or correct any mistakes in the changes done:

Still need help? Open a support ticket

Got any questions? Contact us today.