On this page
As soon as a Windows server is online, bots start guessing passwords on the Remote Desktop port 3389 — usually for the user Administrator. See it for yourself: this PowerShell command counts the failed logins of the last 24 hours on your server:
(Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4625; StartTime=(Get-Date).AddDays(-1)} -ErrorAction SilentlyContinue).Count
Hundreds or thousands? That's normal — and these 5 steps shut them out. Run all commands in PowerShell as Administrator.
1. Use a long password
At least 16 characters, never used anywhere else. A password manager makes this easy. Changing it is explained in How to connect to your Windows RDP server.
2. Lock accounts after failed logins
After 5 wrong passwords the account is locked for 30 minutes — guessing becomes useless:
net accounts /lockoutthreshold:5 /lockoutduration:30 /lockoutwindow:30
3. Use your own admin name (optional, very effective)
Bots almost always try Administrator. Create your own admin user, log in with it once to test, and only then turn the built-in account off:
# Create your own admin (you will be asked for its password)$pw = Read-Host "New password" -AsSecureStringNew-LocalUser -Name "mike" -Password $pw -PasswordNeverExpiresAdd-LocalGroupMember -Group "Administrators" -Member "mike" # ONLY after you logged in successfully as the new user:Disable-LocalUser -Name "Administrator"
Test the new login BEFORE you disable Administrator. On non-English Windows the group is named differently (for example "Administrateurs" in French) — use the name your Windows shows.
4. Move RDP to another port
A port like 44389 instead of 3389 stops almost all automatic scans. Open the new port in the firewall first, then change it:
New-NetFirewallRule -DisplayName "RDP 44389" -Direction Inbound -Protocol TCP -LocalPort 44389 -Action AllowSet-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name PortNumber -Value 44389Restart-Service TermService -Force
Your connection drops. Reconnect with YOUR-SERVER-IP:44389 in Remote Desktop. If you use the firewall in your ServerLoom panel, allow TCP 44389 there too.
Locked out? Open the console (VNC) in your ServerLoom dashboard — it works without RDP — and undo the last step.
5. Allow only your own IP (strongest step)
Find your home IP (search "what is my IP"), then allow RDP only from it and turn off the default "open to everyone" rules:
Set-NetFirewallRule -DisplayName "RDP 44389" -RemoteAddress 203.0.113.25Disable-NetFirewallRule -DisplayGroup "Remote Desktop"
Replace 203.0.113.25 with your IP. Several places? Separate them with commas. If your home IP changes, log in through the dashboard console and update the rule. On non-English Windows, "Remote Desktop" has another name — find it with Get-NetFirewallRule | Where-Object DisplayName -like "*Remote*".
Keep Network Level Authentication (NLA) on
NLA checks the password before the login screen opens, so attackers use far fewer resources on your server. It is on by default; this shows 1 when it is on, and the second line turns it on:
(Get-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp').UserAuthenticationSet-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name UserAuthentication -Value 1
And always: Windows Update
Install security updates every month (Settings → Windows Update). Most RDP attacks that work use old, unpatched servers.
Run a FiveM server on Windows? Also read How to protect your FiveM server from DDoS attacks.
Ryzen or EPYC power, NVMe storage and ServerLoom Shield — online 24/7.