How to Change Terminal Server's Listening Port

ID: Q187623

This article discusses a Beta release of a Microsoft product. The information in this article is provided as-is and is subject to change without notice.

No formal product support is available from Microsoft for this Beta product. For information about obtaining support for a Beta release, please see the documentation included with the Beta product files, or check the Web location from which you downloaded the release.
The information in this article applies to:
  • Microsoft Windows NT Server version 4.0, Terminal Server Edition
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional
  • Microsoft Windows 2000 Datacenter Server
  • Microsoft Windows 2000 Server

IMPORTANT: This article contains information about editing the registry. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the "Restoring the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help topic in Regedt32.exe.

SUMMARY

By default Terminal Server and Windows 2000 Terminal Services uses TCP port 3389 for client connections. Microsoft does not recommend that this value be changed. However, if it becomes necessary to change this port, follow these instructions.


MORE INFORMATION

WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

For information about how to edit the registry, view the "Changing Keys and Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT, you should also update your Emergency Repair Disk (ERD).

To change the default port for all new connections created on the Terminal Server:

  1. Run Regedt32 and go to this key:


  2. 
       HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal
       Server\Wds\Repwd\Tds\Tcp 
    NOTE: The above registry key is one path; it has been wrapped for readability.

  3. Find the "PortNumber" subkey and notice the value of 00000D3D, hex for (3389). Modify the port number in Hex and save the new value.

    To change the port for a specific connection on the Terminal Server:
    • Run Regedt32 and go to this key:
      
            HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal
            Server\WinStations\<connection> 
      NOTE: The above registry key is one path; it has been wrapped for readability.




  4. Find the "PortNumber" subkey and notice the value of 00000D3D, hex for (3389). Modify the port number in Hex and save the new value.

    NOTE: Because the use of alternate ports has not been fully implemented for Terminal Server 4.0, support will be provided as "reasonable effort" only, and Microsoft may require you to set the port back to 3389, if any problems occur.


To Alter the Port on the Client Side

  1. On the client, start Client Connection Manager and create a connection.


  2. Export the connection as a .cns file.


  3. Open the file in a text editor, change the "Server Port=3389" to the port you want to use, and then save the file.


Additional query words:

Keywords :
Version : WINDOWS:2000; winnt:4.0
Platform : WINDOWS winnt
Issue type : kbinfo


Last Reviewed: December 22, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.