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:
- Select Start -> Run. Enter "regedit" to open your Registry Editor.
- Find the Dword named PortNumber in HKEY_LOCAL_MACHINE\System\CurrentControlSet\...
- Modify the PortNumber to any unreserved port. Preferrably stay 5000 and above. Lets say you numbered it as P.
- Now setup port forwarding for port P to be forwarded to the local IP of your machine.
- Do the same thing for all machines behind your NAT and set different ports for each
- 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.