If you’re like me, you have many computers that you connect to remotely when away from work, or home, using RDP.
The easiest way to connect to all of these computers (aside from setting up a VPN) is to change the default port on which Windows will accept RDP connections.
Since things have changed a bit in Microsoft Windows Vista, here is how to change that port:
Click on the Start button, and navigate to accessories. From there, clik on the Run icon. Once the Run applet has started, we’ll enter the good ole regedit command. It still works like a charm!
Within the registry editor, navigate to:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\
Terminal Server\WinStations\EH-Tcp
We want to change the registry key PortNumber in order to modify the default port. The default port is 3390, and I normally use ports in the 338x range, so double click on the key, check the decimal setting, the set the “Value data” to 3389.
Click OK, then close Regedit, and connect from a remote PC.
Note: you may want to create a firewall rule for port 3389 in order to allow connections.
Why not just set port forwarding on your router? For instance, forward port 55454 to internal ip 192.168.5.1 port 3389, then forward port 55453 to internal ip 192.168.5.2 port 3389. In this way, you don’t have to touch the registry of any pc. So, when you remote in from the outside, just add the IP into remote desktop like this: HOST.HOMEIP.NET:55454
…my 2 cents
The only problem with port forwarding is that it typically doesn’t have a specific IP to bind to on cheap routers. This means that you cannot set up multiple RDP/RDC servers behind a LAN, then access these RDP / RDC servers individually. For example if you have one Windows Vista computer, one Windows XP PC and one Windows Server 2003 or 2008, the only easy way to access them all would be a VPN setup. On the other hand, if you are able to simply change the ports, it makes things much easier.
That said, VPN is the more secure way to go… my 2 cents
Couple of thing:
1. In Vista, you don’t have to dig out the Run command. Just type regedit into the Search box on the Start menu.
2. The key you want to change is actually Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Terminal Server\WinStations\RDP-Tcp
ControlSet001 likely won’t have it and it’s RDP-Tcp instead of EH-tcp
Most routers you would buy for the home/small office don’t allow you to specify a port along with the IP address. You tell it what incoming port to send to what IP address and that’s it.
Also, you’ll want to configure your computers with a static IP address instead of having them obtain one from the router. Many cheaper routers don’t have good DHCP options. They don’t let you reserve IP addresses and the leases are fairly short. The Linksys I’m using changes the IP addresses around every 6 days or so at max setting. So without a static IP address, the port forwarding breaks.
Sorry. One more thing I thought of after posting the last comment. If you are running a software firewall (built-in Windows Firewall or anything else), they usually have a preconfigured option to turn on remote desktop. But that works only for port 3389. If you change the listening port, you need to open up that port in the firewall too. You can do this usually in the advanced settings by specifying the port number, protocol, and whether it’s for inbound/outbund and local/Internet connections. You’ll likely want inbound and Internet.
In reference to Walter’s post:
It’s actually Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Control\Winstations\RDP-Tcp
Thanks for the update guys.
As you can see the post is pretty old, and I was working on a Vista pre-release at the time. My trick no longer works, however the update regsitry key Tim pointed out does now work!