Setting Remote Desktop to an Alternate Port

Posted on Posted in terminal server, Terminal Services

The default port for Remote Desktop is 3389, but there are cases where it is useful to change this port, for example on the external interface of a firewall should you be providing remote support of said firewall. These steps are known to work on Windows XP and Windows Server 2003. They have not been tested by me on other versions of Windows.

On the Remote Desktop Server

    1. Start Registry Editor (Regedt32.exe).
  • Locate the following key in the registry:HKEY_LOCAL_MACHINE\ System\ CurrentControlSet\ Control\ TerminalServer\ WinStations\ RDP-Tcp\ PortNumber
  • On the Edit menu, click Modify, click Decimal, type the new port number, and
    then click OK.

 

  • Quit Registry Editor.

 

 

On the Client

    1. Click Start, click All Programs, point to Accessories,
      point to Communications, and then click Remote Desktop Connection.
  • In the Computer box, type the computer name or IP address of the
    computer to which you want to connect, followed by a colon (:) and the port
    number you want to use.For example, to connect to port 3390 on a computer named “MyXPPro,”
    type the following information: MyXPPro:3390

    To connect to port 3391 on a computer with IP address 10.10.10.1,
    type the following information: 10.10.10.1:3391

 

More information at

http://support.microsoft.com/default.aspx?scid=kb;en-us;306759
and

http://support.microsoft.com/default.aspx?scid=kb;en-us;304304

6 thoughts on “Setting Remote Desktop to an Alternate Port

  1. Do you know if this works in Windows 7? I’ve been trying to get this to work there and haven’t had much luck.

    I opened up port 12394 on my router that points to the local IP address of the machine I want to connect to from a remote location. I’ve also pointed that port in the registry settings for RDP.

    On the machine I use from my remote location, I then type the IP address to the firewall followed by a colon, followed by the new port number. I get a generic “can’t connect” message.

    If I do the exact same thing with a Windows XP machine, no problems.

  2. Tina,
    Check your firewall exceptions. Windows FW configuration has changed dramatically in Win7 and may require a bit more tweaking than before. Start by disabling to test yiour config, then turn it back on and work from there to open the port you are using.

  3. Here is a good hypothetical for you:

    Say I have a server with 2 internal I.P. address of 192.168.1.68 and 192.168.1.69 and my current port forwarding configuration on my router is to have port 3389 (Default port) point to 192.168.1.69 if I enter r1.mywebsite.com as the address. If I change my registry value to allow the alternative port and set my port forwarding over to have r2.mywebsite.com point to 192.168.1.68 will this disable the default port? Can I have 2 ports for 2 simultaneous connections on one machine with 2 I.P. addresses?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.