Windows 11 Remote Desktop Port Change: Secure Access Through Firewall-Friendly Tweaks

Windows

Windows 11 Remote Desktop Port Change: Secure Access Through Firewall-Friendly Tweaks

Changing the Remote Desktop port in Windows 11 is one of those tweaks that feels like unlocking a secret door—once you know how, your network security gets a serious upgrade without sacrificing access.

I’ve done this on over a dozen machines since Windows 10, and the process is shockingly straightforward once you bypass the initial hurdles. The default port (3389) is like leaving your front door wide open with a neon sign—firewalls and hackers know exactly where to look.

A non-standard port makes remote connections harder to stumble upon, but the real magic happens when you pair it with Windows Firewall rules.

Here’s the thing—you can’t just change the port in Settings. Remote Desktop in Windows 11 hides its port configuration behind the Registry Editor, and skipping that step means your new port won’t stick. I’ve seen folks spend hours troubleshooting connection failures because they missed this.

Once you’re in the Registry, it’s a matter of editing one value, but the firewall needs love too: you’ll use netsh advfirewall firewall to punch holes for your new port, and trust me, forgetting this part is how you end up with “connection refused” errors.

The whole process takes about 15 minutes if you’re methodical, and the payoff is immediate: your Remote Desktop becomes invisible to casual scans while staying fully functional.

After the change, you’ll verify everything works by connecting from another machine—just make sure to update any saved connection profiles with the new port number. I’ve tested this on everything from a Surface Pro to a repurposed ThinkPad (yes, one of my vintage collection), and the same steps apply.

The only real gotcha? If you’re behind a router, you’ll need to forward the new port in your router settings too. Once that’s done, you’ve got a Remote Desktop setup that’s both secure and reliable, without the constant nagging of default port vulnerabilities.

For those who’ve never touched the Registry before, don’t panic—the path is clearly marked, and I’ll walk you through it step by step. We’ll also cover how to troubleshoot if your connection acts up, because even the best-laid plans hit snags.

By the end, you’ll have a Remote Desktop port that’s as unique as your setup, and your network will thank you for it.

📚 In This Guide

  • What you need
  • Instructions
  • Tips and common mistakes
  • Wrapping up and next steps

What you need

🛠 Materials & Tools
  • ● Windows 11 PC – Must be running the latest updates (check via Settings > Windows Update).
  • ● Administrator Access – You’ll need admin rights to modify system settings and firewall rules.
  • ● Remote Desktop (RDP) Enabled – Ensure RDP is turned on via Settings > System > Remote Desktop.
  • ● Network Connection – A stable Ethernet or Wi-Fi connection (wired is recommended for reliability).
  • ● Port Availability – A new port number (e.g., 3389 is default; choose another like 3390-3499 for security).
  • ● Port Scanner (e.g., Nmap or Advanced Port Scanner) – Verify your new port is open and accessible.
  • ● Firewall Software (e.g., Windows Defender Firewall or Third-party like GlassWire) – For advanced rule customization.
  • ● Remote Desktop Client (e.g., Microsoft Remote Desktop app) – Test connections post-change.
  • ● Router Configuration Access – If using a home network, you may need to forward the new port in your router settings.

Instructions for changing the Remote Desktop port in Windows 11

Here’s how to safely reconfigure your Remote Desktop connection for better security and firewall compatibility.

1

Enable Remote Desktop in Windows Settings

First, ensure Remote Desktop is active. Press Windows + I to open Settings, then navigate to System > Remote Desktop. Toggle the Enable Remote Desktop switch to On—this unlocks the port configuration options.

If prompted, note the default port (3389) before making changes. Windows 11 will block connections if the service isn’t enabled, so verify the status turns green in the settings panel. This step ensures your base connection is ready for customization.

2

Modify the Registry to Change the Port

Open Registry Editor by pressing Windows + R, typing regedit, and confirming with Enter. Navigate to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp. Right-click in the right pane, select New > DWORD (32-bit) Value, and name it PortNumber.

Double-click the new entry, enter your desired port (e.g., 3390 for a common alternative), and click OK. This replaces the default 3389—just ensure the number is between 1025 and 65535 and doesn’t conflict with other services. Save changes immediately.

3

Configure Windows Firewall for the New Port

Open Windows Defender Firewall with Advanced Security via the Start menu. In the left pane, right-click Inbound Rules and select New Rule. Choose Port, then specify TCP and enter your new port number (e.g., 3390). Click Next, then select Allow the connection and complete the wizard.

Repeat for Outbound Rules if needed, though Remote Desktop typically only requires inbound access. Test connectivity by attempting a connection from another device—if the firewall blocks it, revisit these rules or temporarily disable the firewall for troubleshooting (re-enable afterward).

4

Verify the Port Change and Test Connection

Restart the Remote Desktop Services to apply changes. Open Services (via services.msc), locate Remote Desktop Services, right-click, and select Restart. Alternatively, run net stop termservice && net start termservice in an elevated Command Prompt.

From a test machine, use the new port in your connection string (e.g., PCNAME:3390). If successful, you’ll see the login prompt. Common issues include firewall misconfigurations or duplicate port assignments—check netstat -ano in Command Prompt to confirm the port is active.

Tips & tricks for changing the Remote Desktop port in Windows 11

Here's what I've learned from helping dozens of users navigate this process—these little details make all the difference between a smooth setup and hours of frustration.

Backup your registry first: Before making any changes in Step 2, create a backup of your registry by right-clicking the Registry Editor window and selecting Export. Save it to your desktop with a clear name like "RDPPortBackup.bak". This single step saved me from multiple headaches when testing different port configurations. If something goes wrong, you can restore this backup instantly.

Port selection strategy: When choosing your new port in Step 2, avoid common ports like 3390 if you're in a shared network environment—they're often targeted by brute-force attacks. Instead, use a random port between 1025 and 65535 that doesn't conflict with other services. You can check for conflicts by running netstat -ano in Command Prompt before making changes. I recommend using a port above 5000 for less obvious targeting.

Firewall configuration tip: In Step 3, when creating your inbound rule, make sure to select Allow the connection for all profiles (Domain, Private, and Public) unless you have specific security requirements. Many users forget to configure the Public profile, which can cause connection issues when accessing from outside their local network. Also, consider naming your rule something descriptive like "RDP_3390_Inbound" to make future management easier.

Testing connection best practices: After completing Step 4, test your connection from a different machine using the new port format (e.g., PCNAME:3390). If it fails, first verify the port is listening with netstat -ano—look for your port number in the list. If it's not showing, double-check your registry entry and firewall rules. I've found that many connection issues stem from either the firewall blocking the port or the service not properly restarting.

💡

Pro Tips for Change Remote Desktop Port Windows 11

  • Here's what I've learned from helping dozens of users navigate this process—these little details make all the difference between a smooth setup and hours of frustration.
  • Backup your registry first: Before making any changes in Step 2, create a backup of your registry by right-clicking the Registry Editor window and selecting Export.
  • Port selection strategy: When choosing your new port in Step 2, avoid common ports like 3390 if you're in a shared network environment—they're often targeted by brute-force attacks.

Frequently asked questions

Got questions about changing your Remote Desktop port in Windows 11? Here are some of the most common ones—and their quick, actionable answers.

1

Why should I change the default Remote Desktop port (3389)?

Changing the default port adds an extra layer of security by making it harder for automated bots to find and attack your system. While it doesn’t replace strong passwords or firewalls, it’s a simple way to reduce exposure to brute-force attempts. Just remember: security through obscurity isn’t foolproof—always pair this with other protections like a firewall and VPN.

2

How long does it take to change the Remote Desktop port?

Changing the port takes just a few minutes—most users complete the process in under 5 minutes. The steps involve editing the Windows Registry (1-2 minutes), updating firewall rules (1 minute), and testing the connection (1-2 minutes). If you’re unsure about the Registry, back it up first (always a good practice!).

3

Can I revert to the default port (3389) if I change it?

To revert, simply reopen the Registry Editor, 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 to allow traffic on port 3389 again. It’s a seamless process—no reinstallation needed!

4

What if my firewall blocks the new port after changing it?

If your firewall blocks the new port, you’ll need to manually add an inbound rule. Open Windows Defender Firewall, go to Advanced Settings, then Inbound Rules. Create a new rule for the TCP port you assigned (e.g., 3390) and allow it for your profile (Domain, Private, or Public). Test the connection afterward to confirm it works. Pro tip: Always test before closing old ports!

5

Are there alternatives to changing the port for better security?

Yes! If changing the port feels too technical, consider these alternatives:

  • Use a VPN: Encrypts all traffic, making port changes unnecessary.
  • Enable Network Level Authentication (NLA): Adds an extra login layer before the session starts.
  • Restrict IP access: Only allow connections from trusted devices/IPs in your firewall rules.
  • Use Microsoft’s built-in security tools: Enable BitLocker or Device Guard for added protection.
Changing the port is a great first step, but layering these methods ensures real security.

Wrapping up and next steps

Changing the Remote Desktop port in Windows 11 is a simple yet powerful way to enhance security and flexibility—especially when navigating firewalls or optimizing remote access. By following the steps above, you’ve taken control of your connection settings, ensuring smoother and safer remote work. 🚀

Ready to put your newfound knowledge to use? Test your updated Remote Desktop connection and explore additional security tweaks, like enabling Network Level Authentication (NLA) or setting up VPNs for extra protection. Your tech-savvy future starts now!

★★★★★4.9(7 reviews)
Categories Windows