Remote Desktop Protocol (RDP) Port Forwarding

One thing that I love about all news windows products is the remote desktop features. I previously used PCAnywhere but I find that remote desktop is now almost as good, would like to see a file transfer like PCAnywhere has, but remote desktop is free so that is a plus for it.

One of the tasks that I face with my network setup is forwarding ports through my router. There are two issues that I came across when dealing with the RDP forwarding. The first was what is the port number of RDP. With a quick search on Google I found that the standard RDP port is 3389.

Desktop

Now that you have the port number you can simply go into your router and forward that port through and after enabling your remote desktop feature it will work from outside your network as long as you either know your IP address or have a dynamic dns service like I use. To enable remote desktop in Windows XP and Windows 2003 go to the start menu, find the my computer icon and right click on it. Select the properties option in the drop down list and then click on the remote tag in the window that appears. There you will see the two check boxes, check the second box, and then click on the remote user button. Make sure that the users you want to have access are in the list and then click OK until you have exitted all of the windows. RDP is now enabled on your machine.

So this simple setup would have worked for my network but the issue then became I have several servers that I want access to along with my desktop. Now I could just remote to my desktop and then remote to the other machines from there since they are all on the local network. This would create a lot of data that needed to be transferred though, with limited upstream speeds on your broadband connection you don't want this, and will cause performance issues with RDP. So I had two options, I could change the registry entry like was stated in the article. I will paste that fix here just in case that page has an issue at some point:

*****
WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

You can use the Remote Desktop feature in Windows XP Professional to connect to your computer from another, remote computer. WARNING: The Remote Assistance feature in Windows XP may not work properly if you change the listening port. To change the port that Remote Desktop listens on:

Start Registry Editor (Regedt32.exe).

Locate the following key in the registry:

HKEY_LOCAL_MACHINESystemCurrentControlSetControlTerminalServerWinStationsRDP-TcpPortNumber

On the Edit menu, click Modify, click Decimal, type the new port number, and then click OK.
Quit Registry Editor.

NOTE: When you try to connect to this computer by using the Remote Desktop connection, you must type the new port.

Keywords: kbhowto kbnetwork KB306759

Technology: kbrdcMac100 kbrdcsearch kbrdcWin100 kbWinXPPro kbWinXPPro64bit kbWinXPProSearch kbWinXPSearch kbZNotKeyword

*****

The other option I had was to go into my router and specify another external port number and then point that port to the 3398 on the IP address of the machine I wanted to go to. I chose this second option as it was less time consuming and did the trick for me. One appealing thing about the ability to change the port number of RDP is security. If you leave the standard port number then anyone will know to check that port to see if you have Remote Desktop enabled and potentially compromise your network. Let me know if there are any issues with the registry fix though and if there are I will just remove it from this article.

Remote Desktop Protocol (RDP) Port Forwarding

Jason Fortner is co-founder of Total Productivity Solutions. Total Productivity Solutions provides custom SharePoint, webpart and .NET development; and solutions to common software development issues are also provided on the site.

Sharepoint sites, Sharepoint webparts and .NET Development

[http://www.totalproductivitysolutions.com]

[http://www.totalproductivitysolutions.com/ProgrammingTips/default.aspx]