ServerLoomRapide et Sécurisé
Connexion Commencer

How to secure RDP on your Windows server (stop brute-force attacks)

Bots try to guess Windows passwords all day long. Five simple steps — lockout, own admin name, new port, your IP only, NLA — keep your server closed to them.

Intermédiaire 9 min de lecture Mis à jour le 5 déc. 2026 Équipe ServerLoom
Sur cette 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:

PowerShell
(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:

PowerShell
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:

PowerShell
# 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"
Attention

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:

PowerShell
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.

Astuce de pro

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:

PowerShell
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:

PowerShell
(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.

Prêt à essayer ? Obtenez votre serveur RDP Windows

Puissance Ryzen ou EPYC, stockage NVMe et ServerLoom Shield — en ligne 24h/24 et 7j/7.

See Windows plans
Bloqué à une étape ? Notre équipe vous aide 24h/24 et 7j/7. Demander sur Discord

Besoin d’aide ?

Choisissez comment nous contacter