Customize the Windows Remote Desktop Port

by marc walgren12. February 2013 05:30

Remote Desktop connectivity is a powerful and vital part of application development. Whether connecting to your servers in the office, or to a build machine at a client's office across the country, the ability to connect to "your" machine from anywhere creates effeciency.

There is a hurdle to clear when trying to connect to your office machine from outside the firewall. Particularly if you have multiple people needing to connect to their own machine. How can the firewall know which machine is the target of the connection?

The solution is to use a custom port and to have your firewall redirect each port instead of using the default port (3389) for Windows Remote Desktop.

Here is how to do it:

1) Select a conventional port range like 33000. Include the workstations IP address to produce the custom port number. For workstation address use port 33015. Or for, use Port 33225.

2) Override the RDP Port setting in the Windows registry.

\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp

Edit PortNumber entry 

Click ok to save the change. Exit the registry editor. A reboot is required for the port change to take effect.

3) Change your firewall settings. Most firewalls will need two changes, a service addition to "open" the port and rule addition to redirect the external port traffic to the internal workstation.

Define the port service (SonicWall example). 


Define the redirection (SonicWall Example)



Save the configuration.


4) Connecting to your workstation. Add an explicit port to the Remote Desktop connection properties and connect to the workstation.




To wrap up, follow this procedure for each workstations that needs remote access. Remember to use a unique port so the firewall redirects the traffic to the proper machine.



blog comments powered by Disqus

Contact Us  Consulting  Web Development  Data Collection  Flexible Web Lists  Clarion Products  Downloads  How To Order  Site Map  Store  Home
Copyright (c) 1989-2013 Mitten Software Inc., All rights reserved.

Month List