How to Change RDP Port for a Windows Server

To change the default Remote Desktop Protocol (RDP) port on a Windows Server, modify the PortNumber registry value, allow the new port through Windows Firewall and any external network firewall, restart Remote Desktop Services or reboot the server, and connect using the new IP:port address. Changing the default RDP port from 3389 can reduce exposure to automated scans, but it does not replace strong passwords, Network Level Authentication (NLA), or other security measures. Whether you use a dedicated server or Windows VPS hosting, verify the new connection before closing your existing RDP session to avoid losing remote access.

1. Change the RDP Port in the Windows Registry

You can change the RDP port manually through Registry Editor or by using PowerShell. Before making changes, ensure you have administrator privileges and access to your server's recovery console in case the new configuration prevents remote access.

Method 1: Change the RDP Port Manually

  1. Press Windows + R to open the Run dialog.
  2. Type regedit and press Enter to open Registry Editor.

Open Windows Registry Editor

  1. Navigate to the following registry key:

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

  2. Locate the PortNumber value, right-click it, and select Modify.

  3. Select Decimal, enter your preferred port number, and click OK.

Enter the new RDP port number

Choose an unused TCP port between 1024 and 65535, and confirm that it is not already assigned to another service. For example, you can use 33899 instead of the default port 3389.

Method 2: Change the RDP Port Using PowerShell

You can also update the registry from an elevated PowerShell session.

  1. Open PowerShell as an administrator.

Open Windows PowerShell

  1. Run the following command to set the RDP port to 33899:

    Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name PortNumber -Value 33899

Change the RDP port using PowerShell

Replace 33899 with your chosen port number. Use the same port consistently in the registry, Windows Firewall, external firewall rules, and your RDP connection settings.

2. Open the New RDP Port in Windows Firewall

After changing the registry, create an inbound firewall rule that allows TCP traffic through the new RDP port. Otherwise, Windows Firewall may block remote connections even when the registry configuration is correct.

For detailed instructions, see How to Open a Port in Windows Firewall.

Windows Firewall configuration

If your Windows VPS or dedicated server is protected by a provider-level firewall, cloud firewall, or network security group, update that rule as well. A reliable hosting provider may offer a separate control panel for managing these network rules.

For security, restrict the new RDP port to trusted source IP addresses whenever possible instead of exposing it to the entire internet.

3. Restart Remote Desktop Services

The new port setting may require Remote Desktop Services to restart or the server to reboot before the change takes effect.

  1. Type services in the Windows search box and open Services.

Open Services

  1. Find Remote Desktop Services.
  2. Right-click the service and select Restart if available.

Restart Remote Desktop Services

Restarting Remote Desktop Services can disconnect active remote sessions. If restarting the service is unavailable or the port change does not take effect, reboot the server during an appropriate maintenance window.

Keep your existing session open until you have confirmed that the new port works.

4. Test the New RDP Connection

Open Remote Desktop Connection on your local computer.

  1. Enter the server's IP address followed by a colon and the new port number in the Computer field.

  2. For example:

    10.10.XX.XX:33899

  3. Click Connect and enter your Windows credentials when prompted.

Remote Desktop Connection

Windows Security prompt

If the connection fails, verify the registry value, firewall rules, server status, and whether Remote Desktop Services is listening on the new port. You can check the listening port from an elevated PowerShell session:

Get-NetTCPConnection -State Listen -LocalPort 33899

Replace 33899 with your configured port. If no listening connection appears, check the RDP configuration and service status before changing additional settings.

Once the new connection works, you can remove the old inbound firewall rule for port 3389 if it is no longer needed.

Conclusion

Changing the RDP port is a straightforward way to customize remote access on a Windows Server. Update the registry, allow the new port through all relevant firewalls, restart the required services, and verify the connection before ending your current session.

For businesses and traders using Windows VPS or dedicated server hosting, reliable remote access is essential for managing applications and maintaining server availability. When selecting a hosting provider, consider network security, firewall management, and remote recovery options. A USA hosting provider may be suitable if you need US-based infrastructure, but choose your USA hosting location based on your users, applications, and network requirements. Remember that changing the RDP port alone is not sufficient to secure a server; use strong authentication, NLA, restricted firewall access, and timely security updates.

Last Updated:   10/23/2026
Outline