Thursday, July 07, 2005

RDP Question

Recently, I have been asked a question way too often - Is it possible to have Remote Desktop (RDP) connections to multiple boxes sitting behind a NAT box, like your wireless router...?

Well the answer is yes, it is quite possible. See, the issue is that RDP uses a well known port, I think it is port 3389. Now, even if you set up and application level gateway (ALG) at your router to handle RDP connections, they will be directed to one single machine.

To resolve this, you need to change the port number for your Terminal Server. This can be done by slightly tweaking the registry. Follow these steps:

  1. Select Start -> Run. Enter "regedit" to open your Registry Editor.

  2. Find the Dword named PortNumber in HKEY_LOCAL_MACHINE\System\CurrentControlSet\...
    ...Control\TerminalServer\WinStations\RDP-Tcp

  3. Modify the PortNumber to any unreserved port. Preferrably stay 5000 and above. Lets say you numbered it as P.

  4. Now setup port forwarding for port P to be forwarded to the local IP of your machine.

  5. Do the same thing for all machines behind your NAT and set different ports for each

  6. Now to RDP into your machine of choice - instead of just entering the IP address w.x.y.z, you should enter the destination host as w.x.y.z:P.

Hooray..!! You have RDP for multiple machines behind your NAT.

2 Comments:

At July 08, 2005 11:51 AM, Anonymous Anonymous said...

That was an extremely useful post. We have to tackle this problem very often in India.
Is there any way to RDesktop into a XP Home machine??

 
At July 12, 2005 12:34 PM, Blogger Unforgiven said...

Sorry for the late response Mahesh. I will try to answer your question later today.

 

Post a Comment

<< Home