This article will explain how to change remote desktop port on Windows Server 2022. The remote server 2022 support is made possible by the Remote Desktop Protocol (RDP protocol) with which we reach a range of management within computers without having to go directly to the physical location of the user. This clarifies many tasks and provides control for administrators.
By default, the RDP connection port used by Windows Server 2022 is port 3389, and though this may not be applicable, it can become a cause of weakness since an attacker can use the default port to make his connections and cause effects on your server. And in the information hosted there,. Therefore, good security advice is to change the default port and, in this way, add a touch of security to the system.
Table of Contents
For more information and detailed instructions, you can visit the official Microsoft Documentation on changing the remote desktop port in Windows Server 2022:
Change Remote Desktop Port
In the Server Manager, click on the local server and check that “Remote Desktop” is enabled.
If not, we must click there and enable it.
Choose “allow remote connections to this computer and click OK.
Open the Registry Editor by entering regedit in run.
In the Registry Editor, go to the following path:.
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
In this instance, you will need to change the port number that the Remote Desktop service is listening on to 3350. To do this.
Find the name PortNumber. This parameter shows the port on which your Remote Desktop service is running. Double-click on the PortNumber value.
The default port is 3389 (decimal). Change the value of this parameter.
The RDP port is now set to 3350 (decimal).
How to Allow Remote Desktop Port in Windows Firewall
Search the control panel and open it.
In the Control Panel, open the Windows Defender firewall.
Click on advanced settings.
Click on Inbound Rules, and then choose new rule.
In the new inbound rule wizard, select port and click next.
Specify local ports (3350) and click next.
Choose to allow the connection to this port and click next.
Specify the profiles for which this rule applies and click OK.
Assign a name to the rule to create, and click Finish.
Restart Windows Server 2022 to complete the port update process.
Test Remote Desktop Port
On any client computer, we need to test the remote desktop port number.
Open run and type the command mstsc.
In the remote desktop connection window, enter the IP address of Windows Server 2022 with the port we have assigned earlier and click on connect.
Enter the credentials to use and click OK.
It is an issue associated with the RDP certificates; click Yes to access remotely through the selected port.
We have successfully connected with the port number we changed.
Read more: How to Solved CredSSP Encryption Oracle Remediation.