Change the Win2000 terminal services port

Terminal Services for Windows 2000, and Remote Desktop for Windows XP and Windows 2003, use TCP port 3389 for both inbound and outbound traffic. Under some conditions you may be forced to use another port for Terminal Services -- for instance, if you're dealing with a firewall or proxy that doesn't allow certain ports for security reasons.

Microsoft made some provisions to allow users to change the port for Terminal Services, although the company doesn't recommend it unless there is absolutely no other choice. To change the port used, you'll need to edit the Registry on the server and change the settings for the client connections.

To edit the server, open the Registry and navigate to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp. Edit the DWORD value PortNumber and set it to the network port number you wish to use. The default is 00000D3D (hex), or 3389.

On the client side, open the Client Connection Manager and create a new connection to the server. (You won't be able to modify the port number yet.) Save the connection to a file, with a .CNS extension, and edit the file using a text editor. Locate the line that reads Server Port=3389 and edit it to match the new port used on the server. Save the file and reimport it into the Connection Manager to use it.

If you're using Remote Desktop (Windows XP, Windows 2003) to connect to the server, open the Remote Desktop Connection application and create

    Requires Free Membership to View

a new connection to the server. Save the connection to a file, which should have an .RDP extension, and edit it using a text editor. At the top of the file add a line that reads server port:i:<portnumber>, where <portnumber> is the new port number to use. Save the file and double-click on it to launch the connection.

Note that if you are using the Terminal Server ActiveX client, it is hard-wired to use port 3389 and cannot be changed.

Serdar Yegulalp is the editor of the Windows 2000 Power Users Newsletter. Check out his Windows 2000 blog for his latest advice and musings on the world of Windows network administrators – please share your thoughts as well!

This was first published in July 2003

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.