How to Change the RDP Port on Windows Server
You change the RDP port in the Windows registry. First open the new port in the Windows Firewall, then change the port and restart the Remote Desktop service. By default RDP listens on port 3389. A different port greatly reduces the number of automated login attempts on your Windows VPS.
Step 1: open PowerShell as administrator
Right-click the start button and choose Terminal (Admin) or Windows PowerShell (Admin).
Step 2: open the new port in the firewall
In this example we use port 3390. Choose a free port yourself:
New-NetFirewallRule -DisplayName 'RDP 3390' -Direction Inbound -Protocol TCP -LocalPort 3390 -Action Allow Step 3: change the port in the registry
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name PortNumber -Value 3390 Step 4: restart the Remote Desktop service
Restart-Service TermService -Force Your current RDP session is now disconnected. That is normal.
Step 5: connect via the new port
In Remote Desktop, enter the IP address followed by a colon and the new port, for example JOUW-IP:3390.
Locked out?
If you can no longer connect, use the noVNC console in the client area. Check the firewall rule there or set the port back to 3389.
Related articles
Rent a Windows VPS with Remote Desktop
Windows Server with RDP access, enterprise Ceph storage with high availability and hosting in Amsterdam. Ideal for software, trading and business applications.