In all Windows operation systems the default port assigned to RDP (Remote Desktop Protocol) is TCP3389.
- Multiple Remote Desktop Connections On Windows Server 2016 Update
- Multiple Remote Desktop Connections On Windows Server 2016 Evaluation
If your computer is connected to the Internet directly (e. g., a VDS/VPS server) or you have configured port forwarding of 3389/RDP port on your edge router to a Windows computer (server) in the local network, you can change the default 3389/RDP port to any other. By changing the RDP port number, you can hide your RDP server from port scanners, reduce the possibility of exploiting RDP vulnerabilities (the last known vulnerability in RDP BlueKeep is described in CVE-2019-0708), reduce the number of RDP brute force attacks (don’t forget to regularly analyze RDP connection logs), SYN and other attacks (especially, when NLA is disabled).
Multiple Remote Desktop Connections On Windows Server 2016 Update
'The Remote Desktop Connection Broker server could not enumerate the targets for the provider named NULL from the database. Pooled virtual desktop collection name: NULL Error: Logon to the database failed.' 'The Remote Desktop license server could not be registered as a service connection point in Active Directory Domain Services (AD DS). Apr 24, 2020 Microsoft's Remote Desktop Connection is a convenient program for accessing and working with remote Windows workstations and servers. The tool is built into Windows but is also available as a. NOTE: This is an old post. To learn about RDS in Windows Server 2016, please visit our documentation page Introduction: Multiple monitor support for Remote Desktop Services allows users to open a Remote Desktop connection expanded across all the monitors on the client computer regardless of the client monitor configuration. Jan 21, 2021 The most well known remote desktop tools on Windows are Microsoft Remote Desktop and Citrix Receiver. However, neither are the best remote desktop software for Mac users. Unsurprisingly, Microsoft Remote Desktop is mainly designed for Windows users and has various problems on Mac although admittedly is has improved in recent versions. RDCMan (Remote Desktop Connection Manager) is a convenient tool for Windows system administrators that allows to manage multiple RDP connection sessions in a single window, create tree-like structures with the remote Windows hosts (you are constantly using or managing), use different RDP connection settings for separate servers or groups.
When choosing a non-standard RDP port, please note that it is not recommended to use port 1-1023 (known ports) and dynamic RPC port range 49152-65535.
Let’s try to change the port of Remote Desktop service to 1350. To do it:
- Open the Registry Editor and go to the registry key HKEY_LOCAL_MACHINESystemCurrentControlSetControlTerminal ServerWinStationsRDP-Tcp;
- Find the DWORD parameter with the name PortNumber. This parameter shows the port, on which the Remote Desktop service is listening;
- Change the value of this parameter. I have changed the RDP port to 1350 (Decimal); You can change the registry parameter using PowerShell:
Set-ItemProperty -Path 'HKLM:SystemCurrentControlSetControlTerminal ServerWinStationsRDP-Tcp' -Name PortNumber -Value 1350
- If Windows Firewall is enabled on your computer, you will have to create a new rule that allows inbound connection to your new RDP port. (If you reconfigure a remote server through RDP without creating the rule for your firewall, you will lose access to your server.) You can create an allowing inbound rule for your new TCP/UDP RDP port manually in Windows Defender Firewall console (firewall.cpl) or using PowerShell cmdlets from the NetSecurity module:
New-NetFirewallRule -DisplayName 'New RDP Port 1350' -Direction Inbound -LocalPort 1350 -Protocol TCP -Action allow
New-NetFirewallRule -DisplayName 'New RDP Port 1350' -Direction Inbound -LocalPort 1350 -Protocol UDP -Action allow
- Restart your computer or restart your Remote Desktop service with this command:
net stop termservice & net start termservice
- To connect to this Windows computer via RDP, you have to specify the new RDP connection port in your mstsc.exe client using the colon as follows:
RDPComputerName:1350
or by IP address:192.168.1.10:1350
or from the command prompt:mstsc.exe /v 192.168.1.10:1350
If you are using RDCMan to manage multiple RDP connections, you can specify the RDP port you have configured in the Connection Settings tab. - Then you will successfully connect to the remote desktop of a computer using the new RDP port. You can use the
netstat –na | Find “LIST”
command to make sure that your RDS is listening on another port.
The full PowerShell script to change the RDP port number, create the firewall rule and restart the Remote Desktop service on the new port may look like this:
Write-host 'Specify the number of your new RDP port: ' -ForegroundColor Yellow -NoNewline;$RDPPort = Read-Host
Set-ItemProperty -Path 'HKLM:SYSTEMCurrentControlSetControlTerminal ServerWinStationsRDP-TCP' -Name PortNumber -Value $RDPPort
New-NetFirewallRule -DisplayName 'New RDP Port $RDPPort' -Direction Inbound –LocalPort $RDPPort -Protocol TCP -Action Allow
New-NetFirewallRule -DisplayName 'New RDP Port $RDPPort' -Direction Inbound –LocalPort $RDPPort -Protocol UDP -Action Allow
Restart-Service termservice -force
Write-host 'The number of the RDP port has been changed to $RDPPort ' -ForegroundColor Magenta
You can change the RDP number remotely on multiple computers in your AD domain (in the specific OU) using Invoke-Command and Get-ADComputer cmdlets:
Multiple Remote Desktop Connections On Windows Server 2016 Evaluation
Write-host 'Specify the number of your new RDP port: ' -ForegroundColor Yellow -NoNewline;$RDPPort = Read-Host
$PCs = Get-ADComputer -Filter * -SearchBase 'CN=IT,CN=Computers,CN=NY,DC=woshub,DC=com'
Foreach ($PC in $PCs) {
Invoke-Command -ComputerName $PC.Name -ScriptBlock {
param ($RDPPort)
Set-ItemProperty -Path 'HKLM:SYSTEMCurrentControlSetControlTerminal ServerWinStationsRDP-TCP' -Name PortNumber -Value $RDPPort
New-NetFirewallRule -DisplayName 'New RDP Port $RDPPort' -Direction Inbound –LocalPort $RDPPort -Protocol TCP -Action Allow
New-NetFirewallRule -DisplayName 'New RDP Port $RDPPort' -Direction Inbound –LocalPort $RDPPort -Protocol TCP -Action Allow
Restart-Service termservice -force
}
This guide to change the standard RDP port is suitable for any Windows version starting from Windows XP (Windows Server 2003) and up to modern Windows 10 / Windows Server 2019 builds.