The First 30 Minutes on a Windows VPS: A Hardening Checklist

The window between provisioning and the first scan is short. A new Windows VPS is reachable on 3389 from the entire internet, running the vendor’s default administrator name, with no record of who logged in and no way back in if a firewall rule goes wrong. Every item below exists to shrink that window and to make sure a mistake does not cost you the machine. Work in order; each step reduces the blast radius of the next one.

Timing matters more than completeness. Thirty minutes of applied work beats a two-hour hardening project that leaves the box exposed while you read documentation. If you have not chosen a host yet, check which providers give snapshots and console access out of the box; the comparison of Windows VPS plans with RDP included lists both, and they are the safety net for anything below.

Minutes 0-5: know the image and its patch level

Before changing anything, record what you received. Run (Get-ComputerInfo).WindowsProductName, WindowsVersion, OsHardwareAbstractionLayer and Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 8. An image whose newest update is a year old is not a hardened baseline; it is an unpatched one with a checklist attached. Note the time zone and time source too, since logs without a correct clock are close to useless.

Take a snapshot now, before the first change. Name it something you will understand in three months, such as pre-harden-2026-11. Verify that the provider’s console (VNC or serial) works before you touch the firewall, because that console is the only recovery path if a rule locks you out. If the console requires a separate password, set and store it now rather than during an outage.

Minutes 5-10: restrict the listener before anything else

Create the allow rule from the console with the narrowest scope your ISP allows, then delete or disable the broader rule the template left behind. New-NetFirewallRule -DisplayName 'RDP admin' -Direction Inbound -Protocol TCP -LocalPort 3389 -RemoteAddress 198.51.100.7 -Action Allow -Profile Any, followed by Remove-NetFirewallRule -DisplayName 'Remote Desktop - User Mode (TCP-In)' if that is the stock rule name. Run Get-NetFirewallRule -Enabled True | Get-NetFirewallPortFilter to confirm only your rule reaches 3389.

Resist changing the port as a security measure. It reduces log noise and nothing else, and it breaks every bookmark and support script while making the firewall picture harder to read. Source restriction plus NLA plus account lockout addresses the real risk. If you keep a second address for a colleague or a VPN exit, add it as a separate rule with a comment naming the owner.

Minutes 10-15: replace the default identity

Create your own administrative account, test a logon with it in a second session while the original session stays open, and only then disable the vendor account. New-LocalUser -Name admin.mc -Password (Read-Host -AsSecureString) -PasswordNeverExpires, then Add-LocalGroupMember -Group Administrators -Member admin.mc. Rename and disable Administrator rather than deleting it; the built-in SID is needed for some recovery paths.

Set an explicit lockout policy with net accounts /lockoutthreshold:8 /lockoutduration:30 /lockoutwindow:30 and confirm it applies to remote logons under NLA. Then check who can log on: Get-LocalGroupMember -Group 'Remote Desktop Users'. Any account you did not create belongs in a ticket, not in production. Service accounts should never be in that group.

Minutes 15-20: turn on the evidence

Without logging, an intrusion is indistinguishable from a busy day. Enable logon auditing at the policy level with auditpol /set /subcategory:"Logon" /success:enable /failure:enable, and process creation auditing with auditpol /set /subcategory:"Process Creation" /success:enable. Add the command line to process creation events through the ProcessCreationIncludeCmdLine_Enabled value under Microsoft-Windows-Kernel-Audit-Policy-Objects, otherwise 4688 records a name and nothing else.

Increase the Security log size to something usable, 256 MB or more, with wevtutil sl Security /ms:268435456. A default 20 MB log on a server receiving scan traffic can roll over in hours, and you lose exactly the events you need. PowerShell script block logging is worth adding in the same pass: two policy values and a restart of the affected session.

Minutes 20-25: remove what you will never use

List the open listeners and match each to a decision: Get-NetTCPConnection -State Listen | Select-Object LocalAddress, LocalPort, OwningProcess joined against Get-Process. SMB on 445 and RPC on 135 should not be reachable from the internet on a single-purpose host; confirm with an external port scan rather than assuming the provider’s own firewall is doing the work. Two layers is the goal, not one.

Remove roles and features that have no owner: FTP if nothing publishes over it, the print service on a web host, SMB1 if it is still present. Each removed service is one less component to patch. Then check the scheduled tasks for vendor agents you did not install, and decide explicitly whether they stay.

Minutes 25-30: prove you can get back in

Reboot the machine, reconnect from your allowed address, and confirm the console still works. Export the firewall and local policy state so a future change can be compared: netsh advfirewall export C:\backup\fw.wfw and secedit /export /cfg C:\backup\sec.inf. Store copies off the machine, not only on the disk you might lose.

Write the recovery facts down: console URL, provider panel login, the address allowed through the firewall, and the date of the pre-change snapshot. A one-page note kept outside the VPS is the difference between a five-minute fix and a support ticket measured in hours. None of this takes long if you do it while the session is fresh.

The first week after the checklist

Thirty minutes is a starting position, not a finished state. In the first week, apply the pending updates on a schedule you chose, set up a backup that includes system state, and read the Security log once with 4625 filtering on source address to see how much noise arrives. That baseline tells you whether the source restriction is holding and whether lockouts are triggered by scanners or by real users.

Then decide what changes next: TLS hardening, application control, or a proper monitoring agent. Order them by what an attacker would use first against your specific roles. If the box is small and shared with a workload that needs more cores than the plan provides, compare Windows VPS configurations sized for your role set before trimming security controls to save memory.

Leave a Comment