The Remote Desktop Protocol uses port 3389 by default. This port is well-known and often targeted by automated scans. Changing the RDP port can reduce unwanted connection attempts and improve basic security.
Log in locally to the server or via an existing Remote Desktop connection. Open the Run dialog with Win + R, type regedit, and confirm to open the Registry Editor. Navigate to the following registry path:
HKEY_LOCAL_MACHINE
└─ SYSTEM
└─ CurrentControlSet
└─ Control
└─ Terminal Server
└─ WinStations
└─ RDP-Tcp
Find the registry entry named PortNumber. Change the value format to Decimal and enter the desired new port number. It is recommended to choose a port above 1024 that is not already used by another service. After making the change, close the Registry Editor.
The new RDP port must be allowed in the Windows Firewall. Open Windows Defender Firewall with Advanced Security and go to the inbound rules section.
Modify the existing Remote Desktop rule or create a new inbound rule that allows TCP traffic on the newly configured port. Make sure the rule allows the connection and applies to the required network profiles.
The port change only takes effect after restarting the Remote Desktop services or performing a full system restart. A complete server reboot is recommended to ensure the configuration is consistently applied.
When establishing a new Remote Desktop connection, you must explicitly specify the port by appending it to the IP address or hostname. Example:
203.0.113.10:3390
The RDP port shown in the Server Access card (under the Access tab of your VPS in the ZapX Dashboard) still defaults to 3389 and does not automatically update to the port changed in the registry — so be sure to remember your new port. Additionally, the Windows Firewall rule you adjusted only applies at the OS level. If you have set a restrictive default policy or custom rules for incoming traffic in your VPS’s separate Network Firewall (its own tab in the ZapX Dashboard), you must also allow the new port there.
Changing the Windows RDP port reduces the attack surface against automated scans and unauthorized connection attempts. The process involves updating the Windows registry, allowing the new port in the firewall, and restarting the system or services.
After completing these steps, immediately verify access and document the configured port to avoid future connection issues. If you have any questions or need assistance, our support team is available daily to help! 🙂
