Change the Default Remote Desktop (RDP) Port 3389 in Windows
RDP (Remote Desktop Protocol), or Remote Desktop Protocol, is an application layer protocol used to provide remote access to Windows servers and workstations. By default, RDP connection uses TCP port 3389, but sometimes it may be necessary to change rdp port, the most often used when you need to hide your RDP / RDS host from automatic port scanners that are looking for Windows hosts on the network with an open standard rdp port number 3389. Changing the RDP port will reduce the likelihood of exploiting RDP vulnerabilities, reduce the number of remote password guessing attempts using RDP SYN and other types of attacks.
In this article we will show you how to change the RDP port used in remote desktop access.
1. You need to connect to the Windows Client/Server over RDP. For it you need to click to Run option or use WIN+R, next type regedit and press Ok
2. In the Windows Registry Editor you need to do next step HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
3. Change the PortNumber value to anything between 1024 and 65535, such as 50415
4. Start Windows Firewall and create a new rule under "Inbound Rules"
5. Rule type - For port, Protocol TCP, Specific local ports - 50415, Allow connection, Profile - Domain, Public and Private, Name - Allow RDP
How to Connect a Remote Desktop with a Custom RDP Port?
In the future, when connecting, use a new port, for example, 50415. Below you will find steps to connect a remote desktop with a custom RDP port:
1. Start remote desktop connection mstsc, for it you need to press WIN+R keys then type mstsc and press Enter.
2. Now you need in a "Remote Desktop Connection" window enter the IP address of the remote server and a new port number separated by a colon.
You can change the default RDP port for the next versions of Windows: Windows Server 2022, Windows 10, Windows 8.1, Windows 8, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2008 R2.