What is the RDP port number?
The RDP port number is 3389. Remote Desktop listens there by default, over both TCP and UDP. You can move it to another port, but a new number is not real security. On a RapidServer RDP server in Mumbai (BOM1) or Delhi NCR (DEL1), from ₹2,323/mo plus 18% GST, it is better to limit who can reach the port.
How to check which RDP port is in use
Microsoft says Remote Desktop listens on port 3389 by default, and the number is stored in the registry. To read it, open PowerShell as administrator on the server (connect first with Remote Desktop):
Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name 'PortNumber'
The PortNumber line shows the port: 3389 on a fresh server. To see that Windows is really listening, run netstat -ano | findstr :3389, or from your own computer run Test-NetConnection YOUR-SERVER-IP -Port 3389 and look for TcpTestSucceeded : True. If it says False, a firewall or the wrong port is in the way.
How to change the RDP port safely
Order matters. If you change the registry before the firewall allows the new port, the server stops answering on both and you lock yourself out. Microsoft's change listening port guide covers the registry value and the firewall rules; the order below adds the safe sequence. We use 3390 as the example: pick your own number that no other program uses.
1. Add the firewall rule for the new port first
Keep the old 3389 rule for now. In PowerShell as administrator:
$portValue = '3390' New-NetFirewallRule -DisplayName 'RDPPORTLatest-TCP-In' -Profile Public -Direction Inbound -Action Allow -Protocol TCP -LocalPort $portValue New-NetFirewallRule -DisplayName 'RDPPORTLatest-UDP-In' -Profile Public -Direction Inbound -Action Allow -Protocol UDP -LocalPort $portValue
Those are Microsoft's rules, which use the Public profile; if your network profile is Private or Domain, change -Profile to match. Microsoft also warns that with any other firewall, you must allow the new port there too. On a RapidServer server that means the firewall in the client area as well: add 3390 there, with your own IP addresses as the source (steps in the Windows VPS setup guide).
2. Change the port in the registry
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name 'PortNumber' -Value 3390
The same value in Registry Editor is PortNumber under HKLM\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp; choose Decimal when you edit it.
3. Restart and test the new port
Microsoft's steps end with restarting the computer. Reconnect using the new port (next section), or test with Test-NetConnection YOUR-SERVER-IP -Port 3390 from your own computer.
4. Only then remove the old rule
Once 3390 works, disable or delete the 3389 rules: in wf.msc, switch off the Remote Desktop inbound rules for 3389, and remove 3389 from the client-area firewall. Until this step, you can still reach the server on 3389 if something goes wrong. If you did lock yourself out, the browser console in the client area lets you sign in without Remote Desktop and fix the rule.
How to connect to a custom RDP port
Type the address, a colon and the port in the Computer box of Remote Desktop Connection. Microsoft's example is pc1.contoso.com:3390; for a server, it looks like this:
mstsc /v:YOUR-SERVER-IP:3390
The same host:port form works in other clients, such as Microsoft's Windows App. Leave the port off and the client assumes 3389, which is the usual reason for a connection that times out after a change.
Why changing the port is not real security
A different port only hides the front door. A port scan of your server's IP address finds 3390 as easily as 3389, and then the password is still the only lock. What you do gain is fewer automated attempts aimed at 3389, so quieter logs. Microsoft's troubleshooting guide even says to leave the port alone unless another program needs it. What really protects a server is in Is RDP safe?.
Ways to protect RDP: what each one does
| Method | What it does | Stops password guessing? |
|---|---|---|
| Change the port | Moves Remote Desktop off 3389, so fewer automated attempts arrive | No; a port scan finds it |
| Firewall allow-list of your IPs | Only your own IP addresses can reach the port at all | Yes, for everyone else |
| Network Level Authentication | Makes people sign in before a session is set up | Partly; guesses are still possible |
| Long, unique passwords and lockout | Makes guessing impractical and stops a bot after a set number of tries | Yes, for normal accounts |
| VPN or RD Gateway | Keeps the port off the open internet; people connect through a second sign-in | Yes, for outsiders |
On a RapidServer server
A RapidServer RDP server or Windows VPS is unmanaged: Windows and its port are yours to configure, and we supply the tools.
- Firewall rules in the client area, so only your own IP addresses reach Remote Desktop, before traffic touches Windows. Allow the new port there when you change it.
- A browser console in the client area, for when a port change or firewall rule locks you out.
- Daily backups kept 7 days, and snapshots you can take before a change.
- Ready a few minutes after payment in Mumbai (BOM1) or Delhi NCR (DEL1), from ₹2,323/mo plus 18% GST, Windows licence included.
- Two Remote Desktop sessions for administration; RDS CALs for more people are not included.
Your own RDP server in Mumbai or Delhi NCR from ₹2,323/mo plus GST, with support 24/7.
See RDP server plans