Cause: RDP brute force
Automated bots
10 failures β†’ 10 min
Value recommended by Microsoft
1 command
From the noVNC console
Support 7 days a week
Ticket or Discord
Diagnosis

Are you affected ?

If you see this message when connecting to Remote Desktop, this tutorial is for you.

  • VPS running Windows Server 2025

    Or a recent, up-to-date version of Windows Server: lockout of the Administrator account arrived with Microsoft's October 2022 updates.

  • Your password is correct

    And yet the RDP connection fails, sometimes after several days without any problem.

  • The server responds

    Your services (sites, games, apps) are still running: only the Remote Desktop connection is refused.

Why does it happen?

Every server exposed to the Internet receives automated login attempts. Windows applies a lockout policy, including to the Administrator account: it's a protection… that ends up locking you out too.

1
Bots scan

RDP port 3389

2
They try

"Administrator" + passwords

3
10 failures

in 10 minutes

4
Account locked out

for network logins (RDP)

5
You're locked out

and the bots start again

The key to the fix: according to Microsoft (KB5020282), this lockout only applies to network logins such as RDP. Console login is still allowed, and the noVNC console in your client area is precisely a local login.

Video tutorial

The fix on video

Under a minute, no sound needed if you prefer: every step is written on screen.

Chapters

Prefer to read? Written tutorial ↓
Recommended method Β· 2 minutes

Unlock your VPS step by step

The fastest method: go through the console in your client area, which isn't affected by the lockout.

Open your client area

Log in to your RedHeberg client area, then open your Windows VPS page.

Client areaMy servicesYour Windows VPS

Launch the noVNC console

Click Console (noVNC). A window opens showing your server's screen, as if you were sitting in front of it.

The console is a local login: the lockout triggered by the bots doesn't block it.

Log in to Windows

Click the Ctrl+Alt+Del button in the noVNC bar (pressing Ctrl+Alt+Del on your keyboard would be intercepted by your own computer), then enter the password for your account Administrator.

Disable the lockout threshold

Right-click the Start button, then choose Terminal (Admin) or Command Prompt (Admin). Type:

Command Prompt Β· admin
C:\> net accounts /lockoutthreshold:0
The command completed successfully.

The number 0 means no number of failures will lock the account any more.

Check, then reconnect over RDP

Make sure the change has been applied:

Check
C:\> net accounts
…
Lockout threshold:                 Never
# French-language Windows: Seuil de verrouillage : Jamais
…

Close the console and relaunch your Remote Desktop Connection : you're back into your server.

Account still refused? An ongoing lockout can last until it expires (10 minutes by default). In the console, open lusrmgr.msc β€Ί Users β€Ί Administrator and untick "Account is locked out", or wait a few minutes.
Other methods

Prefer the graphical interface ?

Same settings, different paths. All of these steps are done from the noVNC console while RDP is blocked.

Via Local Security Policy (secpol.msc)Standalone VPS
  1. Press Win+R, type secpol.msc and press Enter.
  2. Open Security Settings β€Ί Account Policies β€Ί Account Lockout Policy.
  3. Double-click Account lockout threshold and enter 0 to disable it (or a higher value to simply relax it).
  4. Optional: set Allow Administrator account lockout to Disabled to exempt only the built-in Administrator account.
Domain controller server (Active Directory / GPO)AD domain

On a domain, the rule comes from the Default Domain Policy and applies to every account in the domain.

  1. Open Group Policy Management: gpmc.msc.
  2. Right-click Default Domain Policy (or the relevant GPO) β€Ί Edit.
  3. Go to Computer Configuration β€Ί Policies β€Ί Windows Settings β€Ί Security Settings β€Ί Account Policies β€Ί Account Lockout Policy.
  4. Set Account lockout threshold to 0 (disabled) or increase it, and adjust the Account lockout duration.
  5. Apply the policy immediately:
cmd
C:\> gpupdate /force

Editing the GPO doesn't unlock accounts that are already locked. To release them immediately (PowerShell as administrator):

PowerShell
# List locked-out accounts
PS> Search-ADAccount -LockedOut
# Unlock an account
PS> Unlock-ADAccount -Identity "User_Name"

Graphically: dsa.msc β€Ί double-click the user β€Ί tab Account β€Ί tick Unlock account β€Ί Apply.

Important

Now secure your RDP access

A threshold of 0 removes a protection against brute force: the bots keep trying. Replace it with these three habits, done from the console or an open RDP session.

Priority 1

A long, unique password

16 characters minimum, never reused elsewhere. That's what makes brute force pointless, even without lockout. On French-language Windows, the account is called Administrateur.

cmd
C:\> net user Administrator *
Priority 2

Restrict RDP to your IP

Only your addresses can then reach Remote Desktop: the bots no longer see anything. Replace the example address with yours (on French-language Windows, the group is "Bureau Γ  distance").

PowerShell (Admin)
PS> Set-NetFirewallRule ` -DisplayGroup "Remote Desktop" ` -RemoteAddress 203.0.113.10
Recommended

Change the RDP port

Most bots only target port 3389. First open the new port in the firewall, then restart the service.

PowerShell (Admin)
PS> New-NetFirewallRule -DisplayName "RDP 3390" -Direction Inbound -Protocol TCP -LocalPort 3390 -Action Allow
PS> Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" -Name PortNumber -Value 3390
PS> Restart-Service TermService -Force

Safety net: make these changes with the noVNC console open. If something goes wrong (wrong IP, port not opened), you still have access to fix it. To connect on the new port: your-ip:3390 in the "Computer" field of Remote Desktop Connection. If you combine both settings, also restrict the new rule to your IP: Set-NetFirewallRule -DisplayName "RDP 3390" -RemoteAddress 203.0.113.10.

Frequently asked questions

Why is this happening now, when everything was working?
Recent versions of Windows apply a lockout policy, including to the built-in Administrator account (Microsoft's recommended value: 10 failures in 10 minutes, 10-minute lockout). All it takes is a wave of bots targeting your IP address for the threshold to be reached, sometimes several days after the server goes live.
Has my server been hacked?
No: a lockout actually means the attempts failed. To see where they come from, open Event Viewer (eventvwr.msc) β€Ί Windows Logs β€Ί Security: events 4625 are failed logins, 4740 are lockouts.
Is setting the threshold to 0 dangerous?
It's safe as long as you compensate: a long, unique password, and ideally RDP restricted to your IP or moved to another port (see the section Secure). If you'd rather keep some protection, you can also simply raise the threshold, for example net accounts /lockoutthreshold:30.
I can't use the noVNC console
Check that your browser allows pop-ups for the client area, then use the Ctrl+Alt+Del button in the noVNC bar. If it still doesn't work, open a ticket or message us on Discord: our team is available 7 days a week.
Are Windows Server 2022 or 2019 affected?
They can be: the option to lock out the built-in Administrator account was added in Microsoft's October 2022 updates for all supported versions. The fix is identical.
Support 7 days a week

Still locked out?
We'll handle it.

Open a ticket from your client area or join us on Discord.