The short answer
Check the Security log for failed (4625) and successful (4624) logins, then stop exposing RDP to everyone: restrict it by address or VPN, keep NLA on, set account lockout and use strong passwords.
See the failed logins
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4625} -MaxEvents 50 |
Select-Object TimeCreated, @{n='Message';e={$_.Message.Split("`n")[0]}}Event 4625 is a failed logon. The message shows the account name and the source address.
Check the successful ones
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4624} -MaxEvents 200 |
Where-Object { $_.Message -match 'Logon Type:\s+(10|3)' } | Select-Object -First 20 TimeCreatedEvent 4624 is a successful logon. Logon type 10 is Remote Desktop, and type 3 appears for Remote Desktop with Network Level Authentication. Read the source address in each message. Anyone you do not know means a possible break-in.
If you see a login you do not know
- Disconnect it, change the passwords of every account on the server and reset the server's admin password.
- Check for new users, new scheduled tasks and unknown services.
- Keep the logs. Ask for help before you rebuild.
Lock it down
- Do not expose 3389 to the whole internet. Allow only your office addresses in Windows Firewall, or use a VPN or Remote Desktop Gateway.
- Keep Network Level Authentication on.
- Set account lockout, for example with
net accounts /lockoutthreshold:5. - Use long passwords and a different one for each admin. Rename the built-in Administrator account.
- Add two-step login with a gateway or VPN that supports it.
- Keep Windows updated.
A new port is not protection
Changing the RDP port reduces noise, but scanners find it. The firewall rule or a VPN is the real fix.
Questions people ask
Are failed RDP logins normal?
Yes, for any public server. A strong password and a restricted firewall make them harmless.
Should I block addresses by hand?
It does not scale. Restrict who can reach port 3389 at all.
Do you manage Windows servers?
Yes. We look after updates, backups, monitoring and security on Windows Server, see our Windows management service.