Change the listening port for Remote Desktop

Change the listening port for Remote Desktop: Remote Desktop is a very important feature of Windows which allows users to connect to a computer in another location and interact with that computer as if it’s present locally. For example, you are at work and you want to connect to your home PC then you can easily do if RDP is enabled on your home PC. By default, RDP (Remote Desktop Protocol) uses port 3389 and since it’s a common port, every user has information about this port number which can lead to a security risk. So it’s highly recommended to change the listening port for Remote Desktop Connection and to do so follow the below-listed steps.

Change the listening port for Remote Desktop

Change the listening port for Remote Desktop

Make sure to create a restore point just in case something goes wrong.

1.Press Windows Key + R then type regedit and hit Enter to open Registry Editor.

Run command regedit

2.Navigate to the following registry key:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\

3.Now make sure you have highlighted RDP-Tcp in the left pane then in the right pane look for the subkey “PortNumber.

Go to RDP tcp then select Port Number in order to change the listening port for Remote Desktop

4.Once you have found PortNumber then double-click on it to change its value. Make sure to select Decimal under Base to see the edit its value.

select Decimal under base then enter any value between 1025 and 65535

5.You should see the default value (3389) but in order to change it’s value type a new port number between 1025 and 65535, and click OK.

6.Now, whenever you try to connect to you home PC (for which you changed the port number) using Remote Desktop Connection, make sure to type in the new port number.

Note: You may also need to change the firewall configuration in order to allow the new port number before you can connect to this computer using Remote Desktop Connection.

7.To check the result run cmd with administrative rights and type: netstat -a

Add a custom inbound rule to allow the port through the Windows Firewall

1.Press Windows Key + X then select Control Panel.

control panel

2.Now navigate to System and Security > Windows Firewall.

click on Windows Firewall

3.Select Advanced Settings from the left-hand side menu.

4.Now select Inbound Rules on the left.

select Inbound Rules

5.Go to Action then click on New Rule.

6.Select Port and click Next.

Select Port and click Next

7.Next, select TCP (or UDP) and Specific local ports, and then specify the port number which you want to allow connection for.

select TCP (or UDP) and Specific local ports

8.Select Allow the connection in the next window.

Select Allow the connection in the next window.

9.Select the options which you need from Domain, Private, Public (private and public are the network types that you select when you connect to the new network, and Windows ask you to select the network type, and the domain is obviously your domain).

Select the options which you need from Domain, Private, Public

10.Finally, write a Name and Description in the window that shows next. Click Finish.

Recommended for you:

That’s it you have successfully learned How to Change the listening port for Remote Desktop if you still have any queries regarding this post feel free to ask them in the comment’s section.

Leave a Comment

Your email address will not be published. Required fields are marked *