{"id":1543,"date":"2026-11-24T15:00:57","date_gmt":"2026-11-24T06:00:57","guid":{"rendered":"https:\/\/www.winserver.net\/blog\/?p=1543"},"modified":"2026-11-25T16:32:07","modified_gmt":"2026-11-25T07:32:07","slug":"stop-rdp-brute-force-attacks-windows-vps","status":"publish","type":"post","link":"https:\/\/www.winserver.net\/blog\/stop-rdp-brute-force-attacks-windows-vps\/","title":{"rendered":"How to Stop RDP Brute-Force Attacks on a Windows VPS (2026 Guide)"},"content":{"rendered":"<p><em>Last updated: November 19, 2026<\/em><\/p>\n<p>If your Windows VPS has Remote Desktop open to the internet, it&#8217;s almost certainly being attacked right now. Automated bots scan the internet for Remote Desktop (RDP) on port 3389 and try thousands of user names and passwords, day and night. Security researchers recently reported one campaign using <strong>more than 30,000 new IP addresses every day<\/strong> to target RDP, and exposed RDP remains one of the most common ways attackers break into servers.<\/p>\n<p>The good news: brute-force attacks only work against weak defenses. This guide shows you how to <strong>see the attacks on your own server<\/strong>, then shut them out step by step, with copy-paste PowerShell scripts for each stage.<\/p>\n<div style=\"border: 2px solid #045FA4; border-radius: 8px; background: #F4F8FC; padding: 16px 20px; margin: 0 0 24px;\">\n<p style=\"margin: 0 0 8px; font-weight: bold; color: #394f6d;\">Quick answer<\/p>\n<ul style=\"margin: 0; padding-left: 20px;\">\n<li><strong>Check:<\/strong> look for failed sign-ins (event ID 4625) to see who&#8217;s attacking your server.<\/li>\n<li><strong>Basics:<\/strong> use a long, unique password, rename the built-in Administrator account, turn on account lockout and keep Network Level Authentication (NLA) on.<\/li>\n<li><strong>Best protection:<\/strong> only allow Remote Desktop from your own IP address, or connect through a VPN, so bots can&#8217;t reach the sign-in screen at all.<\/li>\n<li><strong>Extra:<\/strong> automatically block IP addresses that fail to sign in too many times.<\/li>\n<\/ul>\n<\/div>\n<h2>How RDP Brute-Force Attacks Work<\/h2>\n<p>A brute-force attack is simply guessing, at scale:<\/p>\n<ol>\n<li><strong>Scanning:<\/strong> bots constantly scan the internet for servers answering on the Remote Desktop port.<\/li>\n<li><strong>Guessing:<\/strong> they try common user names, especially <code>Administrator<\/code>, <code>admin<\/code> and <code>user<\/code>, with lists of leaked and common passwords.<\/li>\n<li><strong>Getting in:<\/strong> once a guess works, the attacker has full control of the server. Compromised servers are often used for ransomware, sending spam, mining cryptocurrency or attacking other systems.<\/li>\n<\/ol>\n<p>Attackers use huge numbers of different IP addresses, so blocking addresses one by one isn&#8217;t enough on its own. The real defense is making sure a guess can&#8217;t succeed, and ideally that bots can&#8217;t reach the sign-in screen at all.<\/p>\n<p><strong>Prefer to download the scripts? <span style=\"color: #3366ff;\"><a href=\"https:\/\/blog.winserver.net\/wp-content\/uploads\/2026\/11\/rdp-security-scripts.zip\" style=\"color: #3366ff;\">rdp-security-scripts.zip,<\/a><\/span><\/strong> which contains all three scripts from this guide. The full code is also shown below, so you can read what each one does before running it.<\/p>\n<h2>Step 1: See Whether Your Server Is Being Attacked<\/h2>\n<p>Every failed sign-in is recorded in the Windows Security log as <strong>event ID 4625<\/strong>. This script reads the last 24 hours and shows how many attempts there were, which IP addresses they came from, which user names were tried, and your current security settings. <strong>It changes nothing.<\/strong><\/p>\n<p>Run it in <strong>Windows PowerShell as Administrator<\/strong>:<\/p>\n<pre><code class=\"language-powershell\"># RDP security check for a Windows VPS. Changes nothing.\r\n# Run in Windows PowerShell as Administrator.\r\n \r\n\"=== Failed sign-in attempts in the last 24 hours ===\"\r\n$fails = Get-WinEvent -FilterHashtable @{ LogName = \"Security\"; Id = 4625; StartTime = (Get-Date).AddHours(-24) } -ErrorAction SilentlyContinue\r\n\"Total failed sign-ins: $(@($fails).Count)\"\r\n$fails | ForEach-Object {\r\n    $d = ([xml]$_.ToXml()).Event.EventData.Data\r\n    [pscustomobject]@{\r\n        IP   = ($d | Where-Object Name -eq \"IpAddress\").'#text'\r\n        User = ($d | Where-Object Name -eq \"TargetUserName\").'#text'\r\n    }\r\n} | Group-Object IP | Sort-Object Count -Descending | Select-Object -First 10 Count, @{ n = \"IP address\"; e = { $_.Name } } | Format-Table -AutoSize\r\n \r\n\"=== User names attackers tried most ===\"\r\n$fails | ForEach-Object { (([xml]$_.ToXml()).Event.EventData.Data | Where-Object Name -eq \"TargetUserName\").'#text' } |\r\n    Group-Object | Sort-Object Count -Descending | Select-Object -First 5 Count, Name | Format-Table -AutoSize\r\n \r\n\"=== Account lockout policy ===\"\r\nnet accounts\r\n \r\n\"=== Built-in Administrator account ===\"\r\n$admin = Get-LocalUser | Where-Object { $_.SID -like \"S-1-5-*-500\" }\r\n\"Name: $($admin.Name)   Enabled: $($admin.Enabled)\"\r\nif ($admin.Name -eq \"Administrator\") { \"Tip: attackers guess 'Administrator' first. Consider renaming it.\" }\r\n \r\n\"=== Network Level Authentication (NLA) ===\"\r\n$ts = Get-CimInstance -Namespace root\\cimv2\\terminalservices -ClassName Win32_TSGeneralSetting -Filter \"TerminalName='RDP-tcp'\"\r\nif ($ts.UserAuthenticationRequired -eq 1) { \"NLA is ON\" } else { \"NLA is OFF: turn it on\" }\r\n \r\n\"=== Remote Desktop port and firewall ===\"\r\n$port = (Get-ItemProperty \"HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\WinStations\\RDP-Tcp\").PortNumber\r\n\"RDP port: $port\"\r\nGet-NetFirewallPortFilter | Where-Object { $_.LocalPort -contains \"$port\" } | Get-NetFirewallRule |\r\n    Where-Object { $_.Direction -eq \"Inbound\" -and $_.Enabled -eq \"True\" -and $_.Action -eq \"Allow\" } |\r\n    ForEach-Object { [pscustomobject]@{ Rule = $_.DisplayName; \"Allowed from\" = ($_ | Get-NetFirewallAddressFilter).RemoteAddress -join \", \" } } |\r\n    Format-Table -AutoSize\r\n \r\n\"=== Your current Remote Desktop connection comes from ===\"\r\n(Get-NetTCPConnection -LocalPort $port -State Established -ErrorAction SilentlyContinue).RemoteAddress | Sort-Object -Unique<\/code><\/pre>\n<p><strong>What to look for:<\/strong><\/p>\n<ul>\n<li><strong>Hundreds or thousands of failed sign-ins<\/strong> mean bots have found your server. This is common and doesn&#8217;t mean they got in, but it&#8217;s a clear sign to harden it.<\/li>\n<li><strong>The user names tried<\/strong> show what attackers are guessing. If your own user name appears often, change it.<\/li>\n<li><strong>The last line<\/strong> shows the IP address you&#8217;re connecting from right now. You&#8217;ll need it in Step 5.<\/li>\n<\/ul>\n<p>If the IP column shows <code>-<\/code> for some entries, Windows couldn&#8217;t record the address for those attempts. The count is still accurate.<\/p>\n<p><strong>No failed sign-ins at all?<\/strong> Check that failure auditing is on:<\/p>\n<pre><code class=\"language-powershell\">auditpol \/get \/subcategory:\"{0CCE9215-69AE-11D9-BED3-505054503030}\"<\/code><\/pre>\n<p>If it doesn&#8217;t show Failure, turn it on with:<\/p>\n<pre><code class=\"language-powershell\">auditpol \/set \/subcategory:\"{0CCE9215-69AE-11D9-BED3-505054503030}\" \/failure:enable<\/code><\/pre>\n<p>The long code is the ID of the &#8220;Logon&#8221; audit category, which works on any Windows language, including Japanese.<\/p>\n<h2>Step 2: Use a Strong Password and Rename Administrator<\/h2>\n<p><strong>Use a long, unique password.<\/strong> A password of 16 or more random characters, stored in a password manager, can&#8217;t realistically be guessed. Short passwords, or ones reused from other sites, are what brute-force attacks rely on.<\/p>\n<p><strong>Rename the built-in Administrator account.<\/strong> Attackers guess <code>Administrator<\/code> first, so a different name means they have to guess both the user name and the password:<\/p>\n<pre><code class=\"language-powershell\">Rename-LocalUser -Name \"Administrator\" -NewName \"your-new-name\"<\/code><\/pre>\n<p><strong>Before you close your current session,<\/strong> open a new Remote Desktop connection and sign in with the new name to check it works. Your password stays the same.<\/p>\n<p><strong>Set a minimum password length<\/strong> for any other accounts on the server:<\/p>\n<pre><code class=\"language-powershell\">net accounts \/minpwlen:14<\/code><\/pre>\n<h2>Step 3: Turn On Account Lockout<\/h2>\n<p>Account lockout temporarily blocks an account after too many wrong passwords, which stops guessing in its tracks. For example, lock an account for 30 minutes after 10 failed attempts:<\/p>\n<pre><code class=\"language-powershell\">net accounts \/lockoutthreshold:10 \/lockoutduration:30 \/lockoutwindow:30<\/code><\/pre>\n<p><strong>A trade-off to know about:<\/strong> attackers who guess your user name can lock your account on purpose, so you can&#8217;t sign in for a while. That&#8217;s another reason to rename Administrator in Step 2. On some Windows versions, the built-in Administrator account isn&#8217;t covered by lockout at all, so a strong password and a different name matter even more for it.<\/p>\n<h2>Step 4: Keep Network Level Authentication On<\/h2>\n<p>Network Level Authentication (NLA) makes users sign in <strong>before<\/strong> a full Remote Desktop session starts. This saves server resources during attacks and blocks some attack types completely. It&#8217;s usually on by default. The Step 1 script tells you; if it&#8217;s off, turn it on:<\/p>\n<pre><code class=\"language-powershell\">Get-CimInstance -Namespace root\\cimv2\\terminalservices -ClassName Win32_TSGeneralSetting -Filter \"TerminalName='RDP-tcp'\" |\r\n  Invoke-CimMethod -MethodName SetUserAuthenticationRequired -Arguments @{ UserAuthenticationRequired = 1 }<\/code><\/pre>\n<h2>Step 5: Only Allow Remote Desktop from Your IP Address<\/h2>\n<p>This is the most effective step: if Windows Firewall only accepts Remote Desktop from your own IP address, bots can&#8217;t even reach the sign-in screen, and the failed sign-ins in Step 1 drop to almost zero.<\/p>\n<p><strong>Find your IP address:<\/strong> the last line of the Step 1 script shows it, or search &#8220;what is my IP&#8221; on your own computer. This works best if your internet connection has a fixed IP address. If your address changes often, use a VPN instead (Step 6).<\/p>\n<p>Because a mistake here could lock you out, <strong>this script has a safety net<\/strong>: it schedules an automatic undo in 10 minutes. You test a new connection, and only if it works do you cancel the undo. Change the IP address at the top, then run it:<\/p>\n<pre><code class=\"language-powershell\"># Allows Remote Desktop only from the IP addresses you list.\r\n# Includes a safety net: the change is undone automatically after 10 minutes\r\n# unless you confirm it. Run in Windows PowerShell as Administrator.\r\n \r\n# Your own IP address(es). Separate several with commas: \"203.0.113.10\", \"198.51.100.25\"\r\n$AllowedIPs = @(\"203.0.113.10\")\r\n \r\n$port = (Get-ItemProperty \"HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\WinStations\\RDP-Tcp\").PortNumber\r\n \r\n# 1. Safety net: a scheduled task that reopens RDP to everyone in 10 minutes\r\n$undo = \"Get-NetFirewallPortFilter | Where-Object { `$_.LocalPort -contains '$port' } | Get-NetFirewallRule | Where-Object Direction -eq 'Inbound' | Set-NetFirewallRule -RemoteAddress Any\"\r\n$encoded = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($undo))\r\n$action = New-ScheduledTaskAction -Execute \"powershell.exe\" -Argument \"-NoProfile -EncodedCommand $encoded\"\r\n$trigger = New-ScheduledTaskTrigger -Once -At (Get-Date).AddMinutes(10)\r\n$principal = New-ScheduledTaskPrincipal -UserId \"SYSTEM\" -RunLevel Highest\r\nRegister-ScheduledTask -TaskName \"Undo RDP IP limit\" -Action $action -Trigger $trigger -Principal $principal -Force | Out-Null\r\n \r\n# 2. Limit the Remote Desktop firewall rules to your IP address(es)\r\nGet-NetFirewallPortFilter | Where-Object { $_.LocalPort -contains \"$port\" } | Get-NetFirewallRule |\r\n    Where-Object { $_.Direction -eq \"Inbound\" -and $_.Action -eq \"Allow\" } |\r\n    Set-NetFirewallRule -RemoteAddress $AllowedIPs\r\n \r\n\"Remote Desktop now only accepts connections from: $($AllowedIPs -join ', ')\"\r\n\"\"\r\n\"NOW: open a NEW Remote Desktop connection to this server to test it.\"\r\n\"If it works, confirm the change with:\"\r\n\"    Unregister-ScheduledTask -TaskName 'Undo RDP IP limit' -Confirm:`$false\"\r\n\"If you do nothing, the limit is removed automatically in 10 minutes.\"<\/code><\/pre>\n<p><strong>To add another IP address later<\/strong> (for example, your office), run the script again with all of your addresses in <code>$AllowedIPs<\/code>.<\/p>\n<p><strong>To remove the limit<\/strong> and allow Remote Desktop from anywhere again:<\/p>\n<pre><code class=\"language-powershell\">$port = (Get-ItemProperty \"HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\WinStations\\RDP-Tcp\").PortNumber\r\nGet-NetFirewallPortFilter | Where-Object { $_.LocalPort -contains \"$port\" } | Get-NetFirewallRule |\r\n  Where-Object { $_.Direction -eq \"Inbound\" -and $_.Action -eq \"Allow\" } | Set-NetFirewallRule -RemoteAddress Any<\/code><\/pre>\n<p><strong>If you ever get locked out<\/strong> (for example, your home IP address changes), [CONFIRM: use the console in your VPS control panel or contact support] to remove the limit. For more on firewall rules, see <span style=\"color: #000000;\"><strong><a href=\"https:\/\/www.winserver.net\/blog\/windows-vps-firewall-rules-remote-access\/\" style=\"color: #000000;\">how to configure firewall rules on a Windows VPS without breaking remote access<\/a>.<\/strong><\/span><\/p>\n<div class=\"ws-plan-box\" style=\"border: 2px solid #045FA4; border-radius: 10px; padding: 20px 24px; margin: 32px 0; background: #f5f9fd;\">\n<p style=\"margin: 0 0 6px; font-size: 0.85em; font-weight: bold; color: #0189ff; letter-spacing: 0.05em;\">SECURE WINDOWS VPS IN JAPAN<\/p>\n<p style=\"margin: 0 0 10px; font-size: 1.25em; font-weight: bold; color: #394f6d;\">Keep Remote Desktop off the open internet<\/p>\n<p style=\"margin: 0 0 16px; color: #394f6d;\">The safest Remote Desktop is one bots can&#8217;t reach. Winserver plans from SSD-4G up include SoftEther VPN, so you can connect through your own private VPN and limit Remote Desktop to it. Every plan comes with Windows Server, the license included and full administrator access to lock down your server your way.<\/p>\n<p><a class=\"ws-plan-btn\" href=\"https:\/\/www.winserver.net\/#pricing\" style=\"display: inline-block; background: #045FA4; color: #fff; padding: 10px 22px; border-radius: 6px; font-weight: bold; text-decoration: none;\">See Windows VPS Plans \u2192<\/a><\/p>\n<p style=\"margin: 10px 0 0; font-size: 0.8em; color: #6b7c93;\">Recommended: 4 GB plan with VPN from $19.80\/month \u00b7 Windows license included \u00b7 No setup fees<\/p>\n<\/div>\n<h2>Step 6: Connect Through a VPN Instead<\/h2>\n<p>If your IP address changes, or you connect from many places, a VPN gives the same protection: you connect to the VPN first, then use Remote Desktop through it, and Remote Desktop only accepts connections that come through the VPN.<\/p>\n<p>Winserver plans from SSD-4G up include <strong>SoftEther VPN<\/strong>, so you can use your own VPS as a private VPN server. Once the VPN is working, run the Step 5 script with your VPN&#8217;s address range in <code>$AllowedIPs<\/code> (for example, <code>\"192.168.30.0\/24\"<\/code>; use the range your VPN actually assigns).<\/p>\n<p>See <span style=\"color: #000000;\"><strong><a href=\"https:\/\/www.winserver.net\/blog\/how-to-setup-softether-vpn-client\/\" style=\"color: #000000;\">how to set up SoftEther VPN Client on Windows<\/a>.<\/strong><\/span><\/p>\n<h2>Step 7 (Optional): Automatically Block Attackers<\/h2>\n<p>If Remote Desktop must stay open to the internet, this script blocks any IP address with <strong>10 or more failed sign-ins in the last hour<\/strong>. It adds them to a single firewall block rule and logs what it blocked. Your own IP addresses are never blocked.<\/p>\n<p>Create the folder and the script file:<\/p>\n<pre><code class=\"language-powershell\">New-Item -ItemType Directory -Force -Path C:\\Scripts\r\nnotepad C:\\Scripts\\block-rdp-attackers.ps1<\/code><\/pre>\n<p>Paste the following, change <code>$NeverBlock<\/code> to your own IP address, and save:<\/p>\n<pre><code class=\"language-powershell\"># Blocks IP addresses with too many failed sign-ins in the last hour.\r\n# Save as C:\\Scripts\\block-rdp-attackers.ps1 and run every 15 minutes (see the article).\r\n \r\n$Threshold = 10                         # failed sign-ins per hour before blocking\r\n$NeverBlock = @(\"203.0.113.10\")         # your own IP addresses: never blocked\r\n$RuleName = \"Block RDP brute-force IPs\"\r\n$LogFile = \"C:\\Scripts\\blocked-ips.log\"\r\n \r\n$attackers = Get-WinEvent -FilterHashtable @{ LogName = \"Security\"; Id = 4625; StartTime = (Get-Date).AddHours(-1) } -ErrorAction SilentlyContinue |\r\n    ForEach-Object { (([xml]$_.ToXml()).Event.EventData.Data | Where-Object Name -eq \"IpAddress\").'#text' } |\r\n    Where-Object { $_ -and $_ -ne \"-\" -and $_ -notin $NeverBlock -and $_ -notmatch \"^(127\\.|::1$|10\\.|192\\.168\\.)\" } |\r\n    Group-Object | Where-Object Count -ge $Threshold | ForEach-Object Name\r\n \r\nif (-not $attackers) { return }\r\n \r\n$rule = Get-NetFirewallRule -DisplayName $RuleName -ErrorAction SilentlyContinue\r\nif ($rule) {\r\n    $current = @(($rule | Get-NetFirewallAddressFilter).RemoteAddress) | Where-Object { $_ -ne \"Any\" }\r\n    $new = @($attackers | Where-Object { $_ -notin $current })\r\n    if ($new.Count -eq 0) { return }\r\n    Set-NetFirewallRule -DisplayName $RuleName -RemoteAddress (@($current) + $new)\r\n} else {\r\n    $new = @($attackers)\r\n    New-NetFirewallRule -DisplayName $RuleName -Direction Inbound -Action Block -RemoteAddress $new | Out-Null\r\n}\r\n \r\nAdd-Content -Path $LogFile -Value \"$(Get-Date -Format 'yyyy-MM-dd HH:mm') blocked: $($new -join ', ')\"<\/code><\/pre>\n<p>Then run it automatically every 15 minutes:<\/p>\n<pre><code class=\"language-powershell\">$action = New-ScheduledTaskAction -Execute \"powershell.exe\" -Argument \"-NoProfile -ExecutionPolicy Bypass -File C:\\Scripts\\block-rdp-attackers.ps1\"\r\n$trigger = New-ScheduledTaskTrigger -Once -At (Get-Date) -RepetitionInterval (New-TimeSpan -Minutes 15)\r\n$principal = New-ScheduledTaskPrincipal -UserId \"SYSTEM\" -RunLevel Highest\r\nRegister-ScheduledTask -TaskName \"Block RDP attackers\" -Action $action -Trigger $trigger -Principal $principal<\/code><\/pre>\n<p><strong>Check what&#8217;s been blocked:<\/strong><\/p>\n<pre><code class=\"language-powershell\">Get-Content C:\\Scripts\\blocked-ips.log -Tail 20<\/code><\/pre>\n<p><strong>Unblock everything<\/strong> (for example, if you blocked yourself by mistake):<\/p>\n<pre><code class=\"language-powershell\">Remove-NetFirewallRule -DisplayName \"Block RDP brute-force IPs\"<\/code><\/pre>\n<p><strong>Keep expectations realistic:<\/strong> large botnets rotate through thousands of addresses, so this reduces the noise rather than stopping attacks completely. It works best alongside Steps 2 to 4, and isn&#8217;t needed if you&#8217;ve done Step 5 or 6.<\/p>\n<h2>What About Changing the RDP Port?<\/h2>\n<p>Moving Remote Desktop from port 3389 to another port reduces the number of automated attempts, because many bots only scan the default port. But it isn&#8217;t real protection: scanners that check every port will still find it. If you change it, open the new port in the firewall <strong>before<\/strong> changing it, and keep the other steps in this guide in place. Limiting access to your IP address (Step 5) or a VPN (Step 6) is far more effective.<\/p>\n<h2>Keep Windows Updated<\/h2>\n<p>Strong passwords don&#8217;t help against flaws in Remote Desktop itself, and several Remote Desktop vulnerabilities have been patched this year. Install Windows security updates regularly, and set active hours so restarts don&#8217;t interrupt your work.<\/p>\n<h2>Troubleshooting<\/h2>\n<div style=\"overflow-x: auto;\">\n<table>\n<thead>\n<tr>\n<th>Problem<\/th>\n<th>Likely cause<\/th>\n<th>Fix<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>&#8220;The referenced account is currently locked out&#8221;<\/td>\n<td>Too many wrong passwords, by you or an attacker<\/td>\n<td>Wait for the lockout time to pass (30 minutes in Step 3), then sign in. If it keeps happening, rename the account (Step 2) and limit RDP to your IP (Step 5).<\/td>\n<\/tr>\n<tr>\n<td>Can&#8217;t connect after Step 5<\/td>\n<td>The IP address in the script isn&#8217;t the one you connect from<\/td>\n<td>Wait 10 minutes for the automatic undo, check your IP address, and run the script again.<\/td>\n<\/tr>\n<tr>\n<td>Could connect, then stopped working days later<\/td>\n<td>Your home or office IP address changed<\/td>\n<td>Use your provider&#8217;s console or support to remove the limit, then consider a VPN (Step 6).<\/td>\n<\/tr>\n<tr>\n<td>Step 1 shows no failed sign-ins<\/td>\n<td>Failure auditing is off, or RDP is already limited<\/td>\n<td>Check auditing with the <code>auditpol<\/code> command in Step 1.<\/td>\n<\/tr>\n<tr>\n<td>IP address shows as <code>-<\/code><\/td>\n<td>Windows couldn&#8217;t record the address for that attempt<\/td>\n<td>Normal for some attempts. The block script skips these.<\/td>\n<\/tr>\n<tr>\n<td>Blocked yourself with the Step 7 script<\/td>\n<td>Your IP address wasn&#8217;t in <code>$NeverBlock<\/code><\/td>\n<td>Connect from another network or use your provider&#8217;s console, run <code>Remove-NetFirewallRule -DisplayName \"Block RDP brute-force IPs\"<\/code>, then add your address.<\/td>\n<\/tr>\n<tr>\n<td>Scripts won&#8217;t run (&#8220;running scripts is disabled&#8221;)<\/td>\n<td>PowerShell&#8217;s execution policy<\/td>\n<td>Paste the code straight into PowerShell or run the file with <code>powershell -ExecutionPolicy Bypass -File script.ps1<\/code>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2>RDP Security Checklist<\/h2>\n<ul>\n<li>Failed sign-ins checked (Step 1)<\/li>\n<li>Long, unique password stored in a password manager<\/li>\n<li>Built-in Administrator account renamed<\/li>\n<li>Account lockout turned on<\/li>\n<li>Network Level Authentication on<\/li>\n<li>Remote Desktop limited to your IP address, or reached only through a VPN<\/li>\n<li>Optional: automatic blocking of repeat offenders<\/li>\n<li>Windows security updates installed regularly<\/li>\n<\/ul>\n<h2>FAQ<\/h2>\n<h3>Q1. How do I know if someone is trying to break into my VPS?<\/h3>\n<p>Look for event ID 4625 (failed sign-in) in the Windows Security log. The Step 1 script counts them and shows which IP addresses and usernames were used. Hundreds of failed attempts a day are common on servers with Remote Desktop open to the internet.<\/p>\n<h3>Q2. Do failed sign-ins mean my server was hacked?<\/h3>\n<p>No. They mean bots tried and failed. To check for a successful break-in, look for successful sign-ins (event ID 4624) from IP addresses you don&#8217;t recognize, and for user accounts you didn&#8217;t create.<\/p>\n<h3>Q3. What&#8217;s the single most effective step?<\/h3>\n<p>Only allowing Remote Desktop from your own IP address (Step 5), or only through a VPN (Step 6). Bots can&#8217;t attack a sign-in screen they can&#8217;t reach.<\/p>\n<h3>Q4. Is changing the RDP port enough?<\/h3>\n<p>No. It reduces automated attempts, but scanners that check every port will still find Remote Desktop. Use it only alongside strong passwords, lockout and IP limits.<\/p>\n<h3>Q5. Will account lockout lock me out?<\/h3>\n<p>It can, if attackers guess your username. That&#8217;s why renaming the Administrator account matters. Lockout is temporary, and you can sign in again after the lockout time passes.<\/p>\n<h3>Q6. Is there a tool that blocks attackers automatically, like fail2ban on Linux?<\/h3>\n<p>Windows doesn&#8217;t include one, but the Step 7 script does the same basic job. Free third-party tools also exist, if you want more features.<\/p>\n<h3>Q7. Is it safer to use a VPN than open RDP?<\/h3>\n<p>Yes. With a VPN, Remote Desktop isn&#8217;t visible to the internet at all. Winserver plans from SSD-4G up include SoftEther VPN for this.<\/p>\n<p><strong>Sources:<\/strong> <a href=\"https:\/\/www.huntress.com\/blog\/exposed-rdp-misconfiguration-risks\" target=\"_blank\" rel=\"noopener\">Huntress: Exposed RDP, the misconfiguration that keeps paying off<\/a>; <a href=\"https:\/\/rewterz.com\/?p=41996\" target=\"_blank\" rel=\"noopener\">Rewterz: campaign using over 30,000 new IP addresses daily against RDP<\/a>; Microsoft Learn: <a href=\"https:\/\/learn.microsoft.com\/windows\/security\/threat-protection\/auditing\/event-4625\" target=\"_blank\" rel=\"noopener\">Event 4625: An account failed to log on<\/a><\/p>\n<section class=\"winserver-cta-section\">\n<h2>A Windows VPS with Built-In VPN<\/h2>\n<p>Winserver&#8217;s Windows VPS plans include the Windows Server license and full administrator access, and plans from SSD-4G up include SoftEther VPN, so you can keep Remote Desktop off the open internet. English support is included.<\/p>\n<div class=\"winserver-cta-button-wrapper\"><span style=\"color: #ffffff;\"><a href=\"https:\/\/www.winserver.net\/#pricing\" class=\"winserver-cta-button\" target=\"_blank\" rel=\"noopener\" style=\"color: #ffffff;\">View Windows VPS Plans<\/a><\/span><\/div>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>Last updated: November 19, 2026 If your Windows VPS has Remote Desktop open to the internet, it&#8217;s almost certainly being attacked right now. Automated bots scan the internet for Remote Desktop (RDP) on port 3389 and try thousands of user names and passwords, day and night. Security researchers recently reported one campaign using more than [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1546,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[7],"tags":[399,400,377,180,39,383,401,8,38],"class_list":["post-1543","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-security","tag-brute-force","tag-firewall","tag-powershell","tag-rdp","tag-remote-desktop","tag-security","tag-vpn","tag-windows-server","tag-windows-vps"],"_links":{"self":[{"href":"https:\/\/www.winserver.net\/blog\/wp-json\/wp\/v2\/posts\/1543","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.winserver.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.winserver.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.winserver.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.winserver.net\/blog\/wp-json\/wp\/v2\/comments?post=1543"}],"version-history":[{"count":4,"href":"https:\/\/www.winserver.net\/blog\/wp-json\/wp\/v2\/posts\/1543\/revisions"}],"predecessor-version":[{"id":1553,"href":"https:\/\/www.winserver.net\/blog\/wp-json\/wp\/v2\/posts\/1543\/revisions\/1553"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.winserver.net\/blog\/wp-json\/wp\/v2\/media\/1546"}],"wp:attachment":[{"href":"https:\/\/www.winserver.net\/blog\/wp-json\/wp\/v2\/media?parent=1543"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.winserver.net\/blog\/wp-json\/wp\/v2\/categories?post=1543"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.winserver.net\/blog\/wp-json\/wp\/v2\/tags?post=1543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}