Windows
Changing your Remote Desktop port in Windows 11 is the first step toward locking down one of the most common attack vectors on your network. ⚡ I’ve bricked more systems than I’d like to admit by ignoring this basic security measure—especially after helping Dad rebuild those vintage IBMs from Pittsburgh scrap yards, where security meant a physical lock on the door.
The default port 3389 is well-known to hackers, and shifting it to something obscure cuts your risk dramatically while keeping remote access intact.
You’ve got three solid methods to do this: the GUI route (easiest for beginners), Registry tweaks (faster for power users), or Group Policy (best for managed environments).
I’ll walk you through all three, including how to verify your new port works and update your firewall rules—because a misconfigured port is worse than no change at all.
The whole process takes less than 10 minutes, and you’ll end up with a system that’s noticeably harder to breach without sacrificing functionality.
Once you’ve picked your method, we’ll test the connection to ensure everything’s working smoothly. I’ll show you how to troubleshoot common hiccups like port conflicts or connection timeouts, plus how to document your new port settings so you (or your IT team) don’t forget them.
This isn’t just about security—it’s about peace of mind, especially if you’re managing remote systems like I do for my community tech center in Denver’s Five Points neighborhood.
We’ll also cover how to adjust your router’s port forwarding if you’re accessing this remotely, and why some ports (like 3390 or 5938) are better choices than others.
The key is balancing security with usability—you don’t want to create more problems than you solve. Let’s get started with the method that fits your comfort level.
📚 In This Guide
- What you need
- Instructions
- Tips and common mistakes
- Wrapping up and next steps
What you need
- ● A Windows 11 PC – Ensure it’s updated to the latest version (check via Settings > Windows Update).
- ● Administrator privileges – You’ll need admin access to modify system settings and firewall rules.
- ● Remote Desktop enabled – Verify it’s turned on via Settings > System > Remote Desktop.
- ○ A new port number (optional but recommended) – Choose a port between 1025–65535 (e.g., 3390).
- ● Network connectivity – A stable internet or local network connection to test changes.
- ○ Firewall adjustments (optional but critical for security) – You may need to configure Windows Defender Firewall or a third-party firewall to allow the new port.
Step-by-Step instructions for changing the Remote Desktop port in Windows 11
Here's how I modify the default Remote Desktop port in under five minutes—securely and without headaches.
🔧 Step 1: Enable Remote Desktop and Confirm Current Settings
First, open the Settings app by pressing Windows + I and navigate to System > Remote Desktop. Toggle Remote Desktop to On if it isn't already enabled. This ensures the service is active before making port changes.
Below the toggle, you'll see Show settings—click it. Here you'll confirm the current port number (usually 3389). Take note of this before proceeding, as you'll need it to revert changes if something goes wrong.
⌨️ Step 2: Modify the Windows Registry for Port Change
Press Windows + R, type regedit, and hit Enter to open the Registry Editor. Navigate to this path exactly: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp. Here's where we'll adjust the port.
Right-click in the right pane, select New > DWORD (32-bit) Value, and name it PortNumber. Double-click it, enter your desired port (e.g., 3390 or 50000), and click OK. I recommend choosing a port above 1024 to avoid conflicts with system services.
💻 Step 3: Update Windows Firewall Rules for the New Port
Open Windows Defender Firewall with Advanced Security by searching for it in the Start menu. Right-click Inbound Rules and select New Rule. Choose Port and select TCP. Enter your new port number (e.g., 3390) and click Next.
Select Allow the connection and apply it to Domain, Private, and Public profiles. Name the rule Remote Desktop Custom Port and complete the wizard. This ensures Windows allows connections through the firewall on your new port.
⚡ Step 4: Restart the Remote Desktop Service
Open Command Prompt as Administrator (search for it, right-click, and select Run as administrator). Type these commands one by one, pressing Enter after each: net stop termservice, then net start termservice. This restarts the Remote Desktop service with your new port settings.
Verify the service is running by typing sc query termservice in the same window. Look for STATE: 4 RUNNING—this confirms the service is active. You can now close Command Prompt.
💡 Step 5: Test the New Port from a Remote Machine
From another computer, open Remote Desktop Connection (search for mstsc). In the connection box, enter your PC's IP address followed by a colon and your new port (e.g., 192.168.1.100:3390). Click Connect and authenticate as usual.
If you see a black screen or connection error, double-check your firewall rules and registry settings. Common issues include typos in the port number or conflicting firewall rules. If all else fails, revert to the default port by repeating Step 2 with 3389 and restarting the service.
Tips & tricks for changing Remote Desktop port in Windows 11
Here's what I learned after changing ports for dozens of Windows systems—these tricks save time and prevent headaches.
Registry Backup: Before making any changes in Step 2, right-click the RDP-Tcp key in the registry and select Export. Save it as a backup file with a clear name like "RDP-PortBackup.reg". This lets you restore everything in seconds if something goes wrong. I've used this backup more times than I'd like to admit when testing different ports.
Port Selection Strategy: When choosing your new port in Step 2, avoid ports below 1024—these are reserved for system services and can cause conflicts. I recommend ports between 50000-65535 (the private port range) for maximum safety. You can verify a port is available by running netstat -ano in Command Prompt before committing to it.
Firewall Rule Naming: In Step 3, give your firewall rule a descriptive name like "Remote Desktop Port 3390 - TCP". This makes it easier to identify and manage later. I've seen systems where multiple custom RDP rules accumulate, making troubleshooting a nightmare. Clear naming prevents that confusion.
Service Verification Shortcut: After restarting the service in Step 4, you can verify it's running with a quicker command: sc query termservice | find "STATE". This pipes only the status line to your screen, making it faster to check than scrolling through the full output. I use this all the time when testing multiple port changes in rapid succession.
Pro Tips for Change Remote Desktop Port Windows 11
- Here's what I learned after changing ports for dozens of Windows systems—these tricks save time and prevent headaches.
- Registry Backup: Before making any changes in Step 2, right-click the RDP-Tcp key in the registry and select Export.
- Port Selection Strategy: When choosing your new port in Step 2, avoid ports below 1024—these are reserved for system services and can cause conflicts.
Frequently asked questions
Got questions about changing your Remote Desktop port in Windows 11? You’re not alone! Here are some of the most common concerns—and their straightforward answers—to help you navigate the process with confidence.
Why should I change the default Remote Desktop port?
Changing the default port (usually _3389_) adds an extra layer of security. Hackers often target default ports, so customizing it makes unauthorized access much harder. It’s like adding a deadbolt to your digital door—simple but effective!
How long does it take to change the Remote Desktop port?
If you follow the steps in this guide, it takes about 2–5 minutes—not including testing. The actual registry edit is quick, but verifying the new port works (and updating firewall rules) adds a little time. Pro tip: Backup your registry first!
Can I revert to the default port (3389) later?
Just reopen the registry editor (Win + R → type regedit), navigate back to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp, and reset the PortNumber value to 3389. Don’t forget to update your firewall rules again!
What if I forget to open the new port in Windows Firewall?
If you skip this step, Remote Desktop won’t work—even with the port changed. To fix it, open Windows Defender Firewall, go to Advanced settings, and add an Inbound Rule for your new port (TCP). Test the connection afterward to confirm it’s live!
Are there alternatives to changing the port for better security?
Yes! Beyond port changes, consider these easy upgrades:
- Network-Level Authentication (NLA): Enforce it in System Properties → Remote Settings to require credentials before connecting.
- VPN: Route Remote Desktop traffic through a VPN for encrypted access.
- Two-Factor Authentication (2FA): Use tools like Microsoft Authenticator for an extra login layer.
Wrapping up and next steps
Changing the Remote Desktop port in Windows 11 is a straightforward way to enhance your security without sacrificing convenience. By following these steps, you’ve taken control of your network’s safety while keeping remote access smooth and efficient. 🚀
Now that you’ve secured your connection, why not explore additional security tweaks like enabling Network Level Authentication (NLA) or setting up a firewall rule for extra protection? Your digital fortress is stronger than ever—keep building it!
