Applies to: Windows Server 2022, Windows 11, Windows 10, Windows Server 2019, Windows Server 2016
When you connect to a computer (either a Windows client or Windows Server) through the Remote Desktop client, the Remote Desktop feature on your computer "hears" the connection request through a defined listening port (3389 by default). You can change that listening port on Windows computers by modifying the registry.
Start the registry editor. (Type regedit in the Search box.)
Navigate to the following registry subkey:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
Find PortNumber
Click Edit > Modify, and then click Decimal.
Type the new port number, and then click OK.
Close the registry editor, and restart your computer.
The next time you connect to this computer by using the Remote Desktop connection, you must type the new port. If you're using a firewall, make sure to configure your firewall to permit connections to the new port number.
You can check the current port by running the following PowerShell command:
Go to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp. On the right-hand side, Double-click on PortNumber and change the value from 3389 to some other custom value for example 3390 or whatever you want to set.
Control Panel > System Security > Windows Firewall > Advance Settings > Inbound Rules > New Rule > Select Ports > Next > Give your new port number > Allow ALL in case you want to RDP one that port locally or public > Give it a name > Finish.
The Remote Desktop Protocol (RDP) enables remote access to Windows computers and servers. By default, RDP uses a listening port on port 3389, a well-known port that can be a target for malicious attacks.
Navigate to “Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp” and right-double-click on “PortNumber “.
Remote Desktop Protocol (RDP) is a Microsoft proprietary protocol that enables remote connections to other computers, typically over TCP port 3389. It provides network access for a remote user over an encrypted channel.
Control Panel > System Security > Windows Firewall > Advance Settings > Inbound Rules > New Rule > Select Ports > Next > Give your new port number > Allow ALL in case you want to RDP one that port locally or public > Give it a name > Finish.
Introduction: My name is Barbera Armstrong, I am a lovely, delightful, cooperative, funny, enchanting, vivacious, tender person who loves writing and wants to share my knowledge and understanding with you.
We notice you're using an ad blocker
Without advertising income, we can't keep making this site awesome for you.