T The Triage ManualTechnical Guides for IT Emergencies
P4 · Windows Server

Windows Server RDP Brute-Force and DDoS Attack Mitigation Using IPBan

Windows Servers with RDP or other services exposed directly to the internet are routinely targeted by automated brute-force and DDoS attacks, generating high volumes of failed logon events (Event ID 4625) and risking account compromise. IPBan is a lightweight open-source tool that monitors the Windows Security Event Log and automatically creates Windows Firewall block rules for IPs exceeding a configurable failed-login threshold. Deploying IPBan alongside strong password policies, audit logging, and VPN-gated access significantly reduces the attack surface on internet-facing Windows Servers.

Indicators

Likely causes

Diagnostic steps

  1. Open Event Viewer (eventvwr.msc), navigate to Windows Logs > Security, and filter for Event ID 4625. Review the frequency, source IP addresses, and targeted accounts to confirm brute-force activity and establish baseline attack volume.
  2. Review Windows Firewall logs at C:\Windows\System32\LogFiles\Firewall\pfirewall.log to identify repeated inbound connection patterns and confirm source IPs correlate with Event ID 4625 failures.
  3. Confirm that Windows Audit Policy is generating failed logon events: run 'auditpol /get /subcategory:"Logon"' and verify Failure auditing is enabled. If not, enable it: auditpol /set /subcategory:"Logon" /failure:enable
  4. Download the latest IPBan release from the official GitHub repository (https://github.com/DigitalRuby/IPBan) and extract the contents to a stable directory such as C:\IPBan.
  5. Install IPBan as an automatic Windows service using an elevated command prompt: sc create IPBan type= own start= auto binPath= "C:\IPBan\DigitalRuby.IPBan.exe" DisplayName= IPBan
  6. Edit the IPBan configuration file (ipban.config or appsettings.json in the IPBan directory) and set key parameters including FailedLoginAttemptsBeforeBan (e.g. 5) and BanTime (e.g. 01:00:00:00 for 1 day) to align with your security policy.
  7. Start the IPBan service: sc start IPBan — or use Services.msc to start it and confirm the startup type is set to Automatic.
  8. Verify IPBan is actively blocking by reviewing its log file at C:\IPBan\logfile.txt and checking that Windows Firewall block rules are being dynamically created: netsh advfirewall firewall show rule name=IPBan_Block_*

Resolution path

Prevention

Tools

References

windows-serverbrute-forceddosipbanrdp-securitywindows-firewallevent-id-4625ip-blockingauthentication-hardeningsecurityinternet-facinghardening