RdpGuard Blocking Rules - Per-Protocol Limits, Username Blocking and IPv4 Subnet Bans
RdpGuard
Intrusion prevention system for your Windows Server
 

Advanced blocking rules

Overview

Advanced blocking rules let you set separate login limits for a protocol, block IPs that try listed usernames, or block an IPv4 subnet after activity from several source addresses.

Protocol settings replace General for the selected protocol. Username and subnet rules work in addition to normal failed-login limits. Whitelisted addresses stay accessible, including inside a blocked subnet.

Open blocking rules

Click Tools, Options to open Options.

Options - General
Options - General

On the General tab, click Advanced blocking rules. The rules dialog opens:

Advanced blocking rules
Advanced blocking rules

Create a rule

Click Add and choose the rule type. You can also right-click the table and use the Add submenu.

Shortcuts: Alt+P - Protocol settings; Alt+U - Username rule; Alt+S - Subnet rule.

Add
Add

These fields are shared by all three rule types:

  • Rule name: Choose a unique name of up to 100 characters so you can recognize the rule in the list.
  • Enable rule: Keep this checked to apply the rule. Clear it to retain the settings without applying them.
  • Automatically unblock after (hours): Sets the blocking period, in whole hours, from 1 to 8,760. It starts when the rule triggers. A longer existing block is preserved.

Protocol settings

Choose Add, Protocol settings. This example blocks an IP after 5 failed RDP logins, resets its RDP counter after 30 minutes and blocks it for 24 hours.

Protocol settings
Protocol settings
  • Protected protocol: Select one protected protocol. Only one settings rule is allowed for each protocol, including disabled rules.
  • Maximum failed login attempts per IP address: Each source IP has its own counter for this protocol. Attempts on other protocols do not contribute to it; attempts for this protocol do not contribute to the shared General counter.
  • Reset failed login counters after: The interval starts with the first failed attempt. Choose minutes or hours. The allowed range is 1 minute to 999 hours.

Username rule

Choose Add, Username rule. This example blocks an IP on a detected failed login using root, admin or test, without waiting for the normal attempt limit.

Username rule
Username rule
  • Username is one of: Enter one exact username per line, as reported by the detection engine. Wildcards are not supported. Up to 1,000 names are allowed, with up to 256 characters each.
  • Ignore letter case: When checked, root and ROOT match the same entry. Clear it to distinguish letter case.
  • Protected protocol: Select one protocol or all protected protocols. The rule can only match detections that include a username; successful logins do not trigger it.

Subnet rule

Choose Add, Subnet rule. This example blocks a /24 subnet when 10 different source IPs in that subnet are detected within the last 10 minutes.

Subnet rule
Subnet rule
  • Count activity from: Choose IPs with failed login attempts, or IPs blocked after local detections. The second option does not count IP Cloud entries, manual blacklist entries or existing range blocks.
  • Block the subnet when the number of different IPs reaches: Each source IP counts once in the observation period. Repeated activity from one address cannot reach a threshold of 10 by itself. The threshold must be at least 2 and cannot exceed the subnet's address count.
  • Observation period: A rolling period measured from each address's most recent activity. Choose minutes or hours, from 1 minute to 999 hours.
  • IPv4 subnet to block: Choose /16, /20, /24 or /28. The source IP determines the subnet. For example, 203.0.113.7 belongs to 203.0.113.0/24, which contains 256 addresses. Subnet rules apply to IPv4 only.
  • Protected protocol: Select one protected protocol or all protected protocols. Only detections in that scope contribute to the subnet threshold.

Click Save in the rule editor, then in the rules dialog, then in Options to apply the changes.

Edit, disable and arrange rules

Select a rule and click Edit, double-click it, or press F2. The checkbox in the first column enables or disables a rule. Select rules and click Delete to remove them.

Use More, Move up or More, Move down to arrange selected rows. This changes their display order, not rule precedence: every enabled matching rule is evaluated.

Use Ctrl or Shift to select multiple rows, Ctrl+A to select all, or drag a selection rectangle, including from empty table space. Clicking empty space with either mouse button clears the selection.

Import and export

Use More, Export to save the selected rules as JSON. Use Ctrl+A first to export every rule. More, Import adds rules from a JSON file to the current list.

More
More

Import preserves rule IDs. Duplicate IDs, names or protocol settings are rejected without adding part of the file. Remove conflicting rules first when restoring the same set. The maximum is 100 rules.

The blocking rules CLI commands use the same JSON format. CLI export always writes all rules; CLI import supports both append and replace.

See Also

RdpGuard 10.4.5 Free Trial

RdpGuard protects:

Our customers say

"This sotware is really great. It's a relief. Because my server is constantly under attack. Thanks RdpGuard" - Joaquim De Sousa Marques

"Nice product. I used to implement something similiar in a low-tech and cumbersome manner via a script called TSBlock (not mine). This makes it much easier and is well worth the pricetag for SMB's." - J. Johnson

"Absolutely amazed at your product. We are a church in the North Dallas area, and I discovered this morning multiple failed logon attempts via our Remote Access Server. A friend suggested your product, so I immediately downloaded the trial. It had a list of about five blocked IP addresses in minutes, and that was enough to lead me to push the BUY button. Over the past 10-15 minutes the list is now about thirty with at least a third being international attempts to break into our system. Thanks for a great product. You may have just saved us much grief." - John Hallford

"Love the software. RDP on our Windows servers is just ridiculous. We would block it in the router but we have lots of old-time customers that would have issues." - Scott Hirsch

"Love the software! Makes it easier than tailoring VB Scripts!!" - Nick Brennan

"It's a great product - really stopping those RDP attackers :-)" - Dave, UK

"First of all: Your application is very (!!!) useful and I like it very much securing my 2012 R2 server. RdpGuard is the best solution, I found on the market and after 10 minutes of testing it I ordered the fully-featured version. :-)" - Carsten Baltes

Our Other Products
Copyright © 2012-2026 Netsdk Software FZE. All rights reserved.  Terms of Use.  Privacy Policy.  Refund Policy.