Microsoft

Change the Terminal Services listening port in Windows 2000

If you're running Terminal Services in Remote Administration Mode, you might want to change the port used by a particular server in some situations. In this Windows 2000 Server tip, Jim Boyce tells you how to change the listening port with a quick registry edit.

Running Terminal Services in Remote Administration Mode enables you to connect a Windows 2000 Server computer with a Terminal Services client, such as the Remote Desktop Connection (RDC) client included with Windows XP and Windows Server 2003. Once you have established this connection, you can also manage the server remotely.

By default, Terminal Services uses TCP port 3389. However, in some cases, you might want to change the port used by a particular server. One example is if you want to manage multiple servers behind a firewall with port forwarding. In this case, you must change the port on which the server listens for incoming connections.

Changing the listening port is an easy process. Follow these steps:

  1. Go to Start | Run.
  2. Enter Regedt32.exe, and click OK.
  3. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp.
  4. Open the PortNumber subkey, and click the Decimal option.
  5. Enter the port you want to use for the server (such as 3390), and click OK.
  6. Close the Registry Editor, and open the Terminal Services Manager from the Administrative Tools folder.
  7. Verify that there are no current connections to the server.
  8. Right-click the RDP-Tcp branch, and choose Reset.
  9. Test the connection from your RDC client: Enter the IP address of the server, followed by a colon and the port number, such as 192.168.1.10:3390.

If you have problems connecting, verify that the server is listening on the appropriate port. You can do this by opening a command prompt on the server and issuing the NETSTAT -A command. Then, look for the specified port in the returned output.

Note: Editing the registry is risky, so be sure you have a verified backup before making any changes.

Miss a tip?

Check out the Windows 2000 Server Archive, and catch up on the most recent tips from this newsletter.

Want more Win2K tips and tricks? Automatically sign up for our free Windows 2000 Server newsletter, delivered each Tuesday!

Editor's Picks

Free Newsletters, In your Inbox