🔧 How to Change the Remote Desktop Listening Port in Windows
If you want to change the default Remote Desktop port (RDP port) for added security or conflict resolution, follow the step-by-step guide below. By default, Remote Desktop uses port 3389
. Changing this port helps reduce exposure to automated attacks and allows multiple RDP connections on the same server.
📋 Steps to Change the Remote Desktop (RDP) Listening Port
1. Open the Windows Registry Editor
- Press
Windows + R
, type regedit
, and press Enter.
- If prompted by UAC (User Account Control), click Yes to continue.
2. Navigate to the RDP Port Registry Key
Browse to the following registry path:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\PortNumber
3. Modify the Port Number
- Right-click on PortNumber and choose Modify…
- Select Decimal under Base.
- Enter your new port number (e.g.,
3390
) and click OK.
4. Allow the New Port Through the Firewall
Failing to do this may result in losing RDP access. Be sure to update the firewall before rebooting:
- Open Windows Firewall with Advanced Security
- Go to Inbound Rules > click New Rule…
- Select Port > click Next
- Enter your new port number > click Next
- Select Allow the connection > click Next
- Name your rule (e.g.,
Custom RDP Port
) > click Finish
5. Close the Registry Editor
Once you've made the changes, close the Registry Editor.
6. Restart the Server
To apply the new port settings, restart your server or computer.
✅ Important Notes
- After reboot, use
IP:NewPort
format in your Remote Desktop client (e.g., 192.168.1.100:3390
).
- Make sure the new port is not being used by any other application.
- Always test the connection from a separate machine before logging off your server.
🔐 Why Change the RDP Port?
- Helps reduce exposure to brute-force attacks
- Enables running multiple RDP services on a single machine (with NAT or port forwarding)
- Avoids port conflicts in shared or corporate environments
⚠️ Warning: Incorrect changes to the registry can cause serious issues. Always back up your registry before making changes.