Thursday, June 07, 2012

How to configure Windows 7 Remote Desktop to use different port number

Scenario

Imagine you would like to disable the remote desktop session for all users but not yourself.  You can definitely restrict remote desktop users using the Local Security Policy. Then, what if the domain users is part of Administrator group who can remote desktop and you do not wish to change that? 

One way to achieve that is to change the RDP default port 3389. For example use port 3391 for RDP.

How to configure specific port number


   Figure 1.0 RDP port number registry key
  1. Edit the RDP port number (in windows registry) from 3389 to 3391. Run regedit tool and navigate the registry key [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp]
  2. Double click on the registry value, select Decimal and type in 3391.
  3. Logoff the session
  4. Remote Desktop and specify the computer with port number. If your computer name is LUCKY, then specify it to Lucky:3391 and click connect (as shown below).
  5. Voila.
 









Figure 2.0 RDP connect with port number

Possible Issue1 - Unable to RDP using Lucky:3391

Details 

Error might goes like "Remote Desktop Can't Connect to the remote computer for one of these reason ....".

Possible cause

The computer that is used to remote desktop is blocking port 3391. Windows Firewall is blocking port 3391.

Diagnose: How to check the port is blocked by Windows Firewall

  1. Check Window Firewall is ON. If not, check for any 3rd party firewall.
  2. Check whether port 3391 is blocked by running telnet command from command prompt.
  3. Command text => telnet LUCKY 3391 (Assume Computer name = LUCKY and port = 3391)
  4.  If the port is blocked, you should see the screen below







Figure 3.0 Diagnose with Telnet

Solution: Add firewall port number exception (for Windows Firewall)

Steps

  1. Add the port 3391 to your firewall exception rule. This will allow your computer to connect to port 3391.
  2. Open Windows Firewall settings. This could be done by typing firewall.cpl into the command line. Click on Advance Settings.
  3. Create an Outbound Rule on TCP port 3391. Name the rule and close the window
    
Figure 4.0 Firewall Exception

Further reference

2 comments:

Unknown said...
This comment has been removed by the author.
Unknown said...

This is an excellent post for this certain topic.
The failure of information often takes a user to some sense of discontent.
But for the simplicity of customers, Specialists designed a a solution for loss of data challenges.
User have to be knowledgeable of the accessible information restoration resources guaranteeing that he is able to handle the data damage situation in just a most convenient way.
recover deleted folder in outlook