In The Beginning
The Windows Remote Desktop Connection program uses port 3389 by default. You can, however, change the listening port for the Remote Desktop Connection program to whatever port you want. If you are unsure what the Remote Desktop port is on your computer, you can find out by looking in the computer's registry.
The Main Steps
Click "Start" and type "RegEdit" into the search box.
Click on "regedit.exe" in the search results and click "Yes" to confirm that you want to open the Registry Editor.
Go to the "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber" registry key using the left pane of the Registry Editor.
Look at the value next to the "PortNumber" registry key. This value is the port that Remote Desktop is currently configured to use.