How to change RDP port

1 min read

By default, Windows uses port 3389 for RDP (Remote Desktop Protocol), but it's recommended to change it for security and protection. You may also need to change the port in case you encounter the "An internal error has occurred" when connecting via RDP. In this manual, we will explain how to change the RDP port:

Step 1: Regedit

Open the Registry Editor

(regedit)

on the server and navigate to the path

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

.

Find the PortNumber key in this location. Then, switch to decimal format for input and set the new port for RDP connections.

Step 2: Changing the Port

In our example, we will change the port to 65515.

Open the element and change the value to 65515, then click OK.

If your Windows firewall is turned off, simply restart the server and connect using the new port, in this case, IP:65515. If the firewall is enabled on the server, see Step 3.

Step 3: Adding the Port to Exceptions

Go to Firewall --> Advanced settings and add an incoming rule --> Create a rule.

Rule Type --> Port

Protocol TCP --> Specify local ports and enter our port.

Action --> Allow the connection

Choose the profile as needed (or all profiles)

Provide a name for the rule

Add and restart the server, then use IP:PORT in your RDP connection.
Didn’t find the answer?Contact support — we’ll help you sort it out.
Open a ticket →