Wind Layer Blog

How to Change RDP Port in Windows Server 2022

RDP (Remote Desktop Protocol)’s default port is TCP 3389. The TermService (Remote Desktop Services) listens on port 3389 once you enable RDP in Windows. To enhance system security, it is recommended to modify the default port.

Procedures

1. Click Start then search for Windows PowerShell and then Run As Administrator.

2. Run the below command to change the default port. In this example, we will change it to port 5555.

Set-ItemProperty -Path “HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\” -Name PortNumber -Value 5555

3. If the Firewall is enable, we are unable to reach our server, and the port does not change immediately. For the changes to take effect, go to Start, then Control Panel.

4. In the Control Panel click “System and Security”.

5. Enter Click on Windows Defender Firewall then Advanced Settings.

6. On the left panel click on Inbound Rules and then on the right panel click on New Rule.

7. A dialogue box will pop out. Tick on Port and then click Next.

8. On the next page, specify the port “5555” that we used on the windows powershell.

9. Leave everything as default on the next page aside from the Name field. Give your new rule a name. In this case, myRDP, then click Finish.

10. Restart the RDP services for changes to take effect. Go to Start and search for Services. The RDP should now using the new port 5555.

Share the Post:

Related Posts