TechBuzzPro

Change Remote Desktop Port in Windows 11

· 5 min read · Windows & PC

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To change the Remote Desktop port on Windows 11, you need to edit the Windows Registry to replace the default port 3389 with a custom port number, then restart the Remote Desktop service (or reboot). This is done for security through obscurity (reducing automated attacks) or to avoid conflicts with other services. You'll need administrator rights on the PC.

What You'll Need

  • Administrator account on the Windows 11 PC
  • Knowledge of the new port number you want to use (choose a number between 1024 and 65535, avoiding ones already in use)
  • Optional: a text editor to note the port for later reference

Step-by-Step

  1. Open Registry Editor. Press Win + R, type regedit, and press Enter. If prompted by User Account Control, click Yes.
  2. Navigate to the Remote Desktop settings key. In the Registry Editor, go to the following path (copy and paste into the address bar):
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
  3. Find the PortNumber value. In the right pane, locate the PortNumber entry (type REG_DWORD). If it's not there, you can create it: right-click on empty space, select New > DWORD (32-bit) Value, and name it PortNumber.
  4. Edit the port value. Double-click PortNumber. In the dialog, select Decimal as the base, then type your new port number (e.g., 3390). Click OK.
  5. Close Registry Editor.
  6. Restart the Remote Desktop service. Press Win + R, type services.msc, and press Enter. In the Services window, scroll to Remote Desktop Services (or TermService). Right-click it and select Restart. If you can't restart it, a full system reboot will also apply the change.
  7. Verify the new port is listening. Open Command Prompt (as admin) and run: netstat -an | findstr :yourport. You should see a line with LISTENING on that port.
  8. Update your firewall (if needed). By default, Windows Firewall allows Remote Desktop only on port 3389. To allow the new port, open Windows Defender Firewall with Advanced Security (search for it in Start). Click Inbound Rules > New Rule > Port. Choose TCP and enter your new port number. Select Allow the connection and apply to all profiles. Name it something like "RDP Custom Port".
  9. Connect using the new port. When connecting from another PC, enter the IP address followed by a colon and the port, e.g., 192.168.1.10:3390. (Note: the Remote Desktop client's address field supports this syntax.)

Common Mistakes

  • Using a port below 1024 – These are reserved for system services and may cause conflicts or require extra privileges.
  • Forgetting to change the firewall – Even if the port is changed, Windows Firewall will still block incoming connections on the new port unless you add a rule.
  • Editing the wrong registry key – Some guides mention a different path (like ...\Control\Terminal Server), but the correct one for the RDP listener is ...\WinStations\RDP-Tcp.
  • Not restarting the service or PC – The change only takes effect after a restart of the Remote Desktop service or a full reboot.
  • Choosing a port already in use – If another program uses that port, Remote Desktop may fail to start. Check with netstat first.

Tips

  • Pick a port number that is unlikely to be scanned, but avoid obvious ones like 3389 or 3390. A random number between 49152 and 65535 (the dynamic range) is a good choice.
  • If you use a VPN to access your PC, you don't need to open a firewall port at all – just connect via VPN and use the internal IP with the custom port.
  • Keep a record of the port number somewhere safe – you'll need it every time you connect.
  • Consider using Network Level Authentication (NLA) for extra security – it's enabled by default on Windows 11.

Troubleshooting

If Remote Desktop won't start after the change:

  1. Check that you entered the correct registry path and that the PortNumber value is in decimal (not hexadecimal).
  2. Verify the port is not already in use: run netstat -an | findstr :port in Command Prompt. If it shows a different program listening, choose another port.
  3. Make sure the Remote Desktop service is running. In Services, check that Remote Desktop Services is started. If it fails to start, look at the Windows Event Viewer for error details.
  4. If you still can't connect, temporarily disable the firewall to test (not recommended for long-term), or double-check your inbound rule is for TCP and the correct port.
  5. If you changed the port and then forgot it, you can look it up again in the registry under the same key.

If you can't connect from another PC:

  • Make sure you're using the correct syntax: IP:port (e.g., 192.168.1.5:3390).
  • Ensure the PC is reachable on the network (ping it).
  • Check if the Remote Desktop service is listening on that port using netstat on the target PC.

Frequently Asked Questions

Do I need to change the port for security?

Changing the default port can reduce automated attacks, but it's not a substitute for strong passwords, Network Level Authentication, and keeping Windows updated. It's a minor security measure, not a fix-all.

Can I use any port number?

Yes, between 1024 and 65535. Avoid ports already used by other services (like 80 for HTTP, 443 for HTTPS).

Will this affect other remote desktop tools like TeamViewer?

No, third-party tools use their own ports and protocols. This change only affects the built-in Remote Desktop (RDP).

How do I connect to a PC with a custom port?

In the Remote Desktop client, type the IP address followed by a colon and the port, like 192.168.1.10:3390. You can also save this as a .rdp file.

What if I want to revert to the default port?

Simply go back to the registry, change the PortNumber value back to 3389, restart the service, and remove the custom firewall rule.

Does this work on Windows 10 as well?

Yes, the registry path and steps are identical on Windows 10.