Extra Systems Ban Software (ESBANS)

ES-RDP

File common.ps1

The common.ps1 file is used by all main and additional modules of the ES-RDP system and contains all the general settings required for their operation. It acts as the primary control panel for the entire ES-RDP system. A typical working configuration is shown below:

# Remote Desktop Security System
# Extra Systems Remote Desktop Protection
# ES-RDP © Extra Systems, 2026
#

# --- PRIMARY BAN RULES GUIDE TABLE (ID, Hours, Limit, Type) ---
# Here you can (but it is not recommended) change only Hours and Limit.
$BanRules = @(
    [PSCustomObject]@{ ID = 140; Hours = 24; Limit = 6;  Type = "AUTH" },
    [PSCustomObject]@{ ID = 131; Hours = 24; Limit = 12; Type = "SCAN" }
)

# System configuration

# These parameters cannot be changed.
$LogName = "Microsoft-Windows-RemoteDesktopServices-RdpCoreTS/Operational"
$BanTypes = @{ short = 1; long = 2; net = 3; bot = 4 }
$FirewallPrefixes = @{
    short = "ES_RDP_Short_Drop_"
    long  = "ES_RDP_Long_Drop_"
    net   = "ES_RDP_Net_Drop_"
    bot   = "ES_RDP_Bot_Drop_"
}

$FullBanName = @{
    short = "prison"
    long  = "soldier"
    net   = "camp"
    bot   = "crematorium"
}

# These parameters can be changed (but are not required)

# Setting the search and blocking time

# single host
$PrimeTime = 3			# block duration, days
$PrimeSlice = $PrimeTime	# violation search depth, days

# recurrent offenders
$LongTime = $PrimeTime * 7	# blocking period, days
$LongLimit = 3			# violation limit for repeat offenders
$LongSlice = $LongTime		# relapse search depth, days

# IP address blocks /24
$NetTime = $PrimeTime * 2	# block period, days
$NetLimit = 4			# number of hosts for the botnet
$NetSlice = $NetTime		# botnet search depth, days

# recurring offender networks
$BotTime = $NetTime * 7		# block period, days
$BotLimit = 3			# violation limit for repeat offenders
$BotSlice = $BotTime		# repeat offender search depth, days

$BanTimes = @{ short = $PrimeTime; long = $LongTime; net = $NetTime; bot = $BotTime }

# Exclusion list (Whitelist)
# You can specify specific IP addresses or masks with wildcards
$WhiteList = @(
    "192.168.0.*",
    "192.168.1.1"
)

# MySQL access parameters
$mysql_path     = "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql.exe"
$mysql_dbName   = "rdp_ban"
$mysql_user     = "*******"
$mysql_password = "*******"

The MySQL database login and password (as well as the path to mysql.exe) should match your specific system configuration. You can also customize the whitelist to suit your needs. We do not recommend modifying any other parameters (at least initially); these default values have been thoroughly tested and optimized for performance.

The content of this page is also available in Russian.


© Extra Systems, 2026 Extra Web Top