Monday, March 17, 2014

Setting up RDP on a different (non standard port)

If you want/need to set up RDP on a non standard port, here is how.


Why would you want to?  Perhaps you have a number of machines behind a NAT router that need to use port forwarding.

The standard port for RDP is going to be 3389.

1 - Start by enabling RDP on the local machines:

  • Right-click on My Computer > Properties
  • In left nav bar, click Remote settings
  • In the Remote tab, select Allow connections from computers running any version of Remote Desktop
  • Click OK.

2 - At this point, RDP is enabled.  Now change the default port by editing the system registry.


  • Start regedit: Start > run regedit.exe
  • Navigate to:
    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
  • Edit the key: PortNumber 
  • Change the value accordingly
  • Reboot the computer

3 - Deal with any firewall issues.  Either make sure your firewall is off OR make sure that the ports that are using are allowed through the OS firewall.  If you are using the Windows firewall, you can add a new inbound rule like this:



  • Start > Firewall with Advanced Security on Local Computer
  • Select Inbound Rules on the left
  • Click New Rule... on the right
  • Go through the wizard: select Port as the rule type and specify the port value








4 - The next step is to access the system.  Bring up the Remote Desktop client and specify the IP address along with the port in the form <ip>:<port>.  In the example below, the port is 3390.




5 - Finally, if necessary, configure your router to do the appropriate port forwarding based on the specific port. (those steps are going to be dependent on the router and are not documented here)