Mets Minor League Blog

Music theory, instruments and musicians

Mets Minor League Blog

Music theory, instruments and musicians

How to Change Remote Desktop Port in Windows 11

How to Change Remote Desktop Port in Windows 11

Changing the default Remote Desktop port in Windows 11 can enhance your security by making it less predictable for potential attackers. It also allows you to run multiple Remote Desktop services on different ports or troubleshoot connection issues caused by port conflicts. Before proceeding, ensure you have administrator privileges on your Windows 11 machine, and consider creating a system restore point or backing up your registry in case you need to revert changes.

What You’ll Need

  • Administrator access to your Windows 11 PC
  • Basic familiarity with Windows settings and Registry Editor
  • Optional: a remote device to test the connection after changes

Step-by-Step

  1. Open the Registry Editor by pressing Windows + R, typing regedit, and hitting Enter. Confirm any User Account Control prompts.
  2. Navigate to the following registry key: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp.
  3. Locate the value named PortNumber. By default, it is set to 3389.
  4. Right-click on PortNumber and select Modify.
  5. Change the base to Decimal if it isn’t already, and input your desired port number (e.g., 3390). Make sure the port you choose is not already in use by another service and is above 1024 to avoid conflicts.
  6. Click OK to save the change.
  7. Close the Registry Editor.
  8. Open Windows Defender Firewall settings by searching for ‘Firewall’ in the Start menu and selecting Windows Defender Firewall.
  9. Click on Advanced Settings on the left pane.
  10. In the Windows Firewall with Advanced Security window, select Inbound Rules.
  11. Look for rules named Remote Desktop – User Mode (TCP-In). Right-click on each and select Properties.
  12. Go to the Protocols and Ports tab, and change the Local Port to your new port number. Do this for all relevant rules.
  13. Click OK to apply the changes.
  14. To allow the new port through the firewall, create a new inbound rule: click New Rule on the right pane.
  15. Select Port and click Next.
  16. Choose TCP and specify the port number you set earlier.
  17. Allow the connection and specify the profiles (Domain, Private, Public) as needed.
  18. Name the rule (e.g., ‘Remote Desktop Custom Port’) and finish.
  19. Now, restart your computer to apply all changes.
  20. After rebooting, test your Remote Desktop connection by specifying the new port. For example, in the Remote Desktop client, enter your-ip-address:port (e.g., 192.168.1.10:3390).

Common Mistakes

  • Forgetting to update firewall rules to allow traffic on the new port.
  • Choosing a port number already in use by another service, causing conflicts.
  • Not running the Registry Editor or Firewall settings as administrator, which prevents changes from saving.
  • Not restarting the system after making changes, leading to the old port still being active.
  • Failing to specify the port correctly when connecting via Remote Desktop client.

Tips

  • Pick a port number above 1024 to avoid conflicts with well-known services.
  • Document the port change to avoid confusion later.
  • Test the new port locally before trying to connect remotely.
  • Consider changing the default port only if you understand the security implications.
  • Always back up your registry before making changes.
  • If you run into issues, revert to the default port (3389) and check your firewall rules.

Troubleshooting

If your Remote Desktop connection fails after changing the port, follow these steps:

  1. Verify that the registry change was saved correctly by reopening the Registry Editor and checking the PortNumber value.
  2. Ensure that your firewall rules are correctly updated to allow traffic on the new port and that the rules are enabled.
  3. Check if the new port is open and listening using the command prompt: netstat -an | find "LISTEN". Look for your port number in the list.
  4. Make sure the Remote Desktop service is running. You can restart it via Services.msc by finding Remote Desktop Services.
  5. If you are connecting over a network, ensure port forwarding is properly configured on your router if accessing from outside your local network.
  6. Disable any third-party security software temporarily to see if it blocks the new port.
  7. If all else fails, revert the port change to 3389 and re-test the connection.

Frequently Asked Questions

1. Is changing the Remote Desktop port secure?

Changing the default port can reduce automated attacks but is not a substitute for other security measures like strong passwords, network security, and VPNs.

2. Can I revert to the default port later?

Yes, simply change the PortNumber value back to 3389 in the Registry and update firewall rules accordingly.

3. Do I need to open the new port in my router?

If you connect remotely over the internet, yes, you must forward the new port in your router’s settings to your Windows 11 machine.

4. What if I want to run multiple RDP instances?

You can assign different ports to each instance by repeating the process and configuring each service separately, then connecting using IP:port.

5. Will changing the port affect local RDP connections?

Local connections are unaffected if you specify the port explicitly in the Remote Desktop client or use the default port.

6. Is there a risk of locking myself out?

Yes, if you misconfigure the port or firewall rules, you might lose remote access. Always test the new setup thoroughly before closing other access methods.

Changing the Remote Desktop port in Windows 11 is a practical way to enhance security and customize your remote access setup. Follow these steps carefully, and always keep a backup of your system or registry before making significant changes. With proper configuration and testing, you can enjoy a safer and more flexible remote desktop experience.

Related

How to Change Remote Desktop Port in Windows 11
Scroll to top