Login Security Firewall
Protect MT5 authentication at the server gate with CIDR IP allow/deny lists, jurisdiction country blocks, Manager/API IP locks, brute-force IP bans, and impossible-travel detection.
What it does
9 capabilities- Pre-authentication fail-closed MT5 login gate (HookUserLogin and HookUserLoginExt)
- IPv4/IPv6 exact, wildcard, and CIDR whitelist_ips and blacklist_ips rules
- Global blocked_countries, strict allowed_countries, and group_blocked_countries overrides
- Dedicated manager_allowed_ips lock for manager, admin, and api connections
- Per-IP brute-force rate limiting (max_logins_per_ip_minute) with temporary IP bans
- Impossible-travel detection across distinct IPv4 /16 and IPv6 /48 networks
- Bounded memory maps automatically pruned on timer with zero leak growth
- Restart-persisted active temporary IP bans with automatic expiry
- Configurable reject or alert_only mode, dry_run preview, and login_firewall CRM report
How it works
Login Security Firewall intercepts MT5 login requests pre-authentication via HookUserLogin and HookUserLoginExt (fail-closed) and mirrors tracking in post-login callbacks. Regulated brokers can enforce global and per-group ISO-2 country block lists or strict allow-lists, block VPN/Tor/datacenter IPv4 and IPv6 CIDR ranges, lock down Manager, Administrator, and WebAPI logins to office or bastion IPs, automatically rate-limit and temporarily ban brute-force or credential-stuffing IPs with restart-persisted ban expiry, and flag or block impossible-travel logins switching IPv4 /16 or IPv6 /48 networks within a short window. Whitelisted CIDRs and exempt logins bypass restrictions cleanly, and operators can choose reject or alert_only actions plus dry-run evaluation with full audit rows written to the login_firewall CRM report.
Parameters & options
Configured directly in MetaTrader 5 Administrator and testable live in the simulator.
| Parameter | Type | Default | Description |
|---|---|---|---|
groups | group mask | * | Client groups protected by the login firewall (MT5 group mask). * means all |
exempt_logins | text | empty | Comma-separated account logins always allowed by the firewall |
whitelist_ips | text | empty | Comma-separated allowed IP, wildcard, or IPv4/IPv6 CIDR rules that bypass firewall checks |
blacklist_ips | text | empty | Comma-separated denied IP, wildcard, or IPv4/IPv6 CIDR rules (VPN, Tor, datacenter, abuser ranges) |
blocked_countries | text | empty | Comma-separated blocked ISO-2 country codes matched against account country, for example US,KP,IR,SY |
group_blocked_countries | text | empty | Per-group additional blocked ISO-2 country codes, semicolon separated, for example eu*=US,JP; retail*=KP,IR |
allowed_countries | text | empty | Optional strict ISO-2 country allow-list (empty allows all non-blocked countries) |
manager_allowed_ips | text | empty | Strict IP, wildcard, or CIDR allow-list enforced on manager, admin, and api connections |
max_logins_per_ip_minute | int | 20 | Maximum login attempts per IP address per rolling 60-second window before triggering a rate limit (0 disables) |
block_minutes | int | 15 | Temporary IP ban duration in minutes after exceeding max_logins_per_ip_minute (0 disables temp ban) |
impossible_travel_minutes | int | 30 | Minutes within which a login switching IPv4 /16 or IPv6 /48 networks triggers impossible travel (0 disables) |
action | text | reject | Enforcement action on rule violations: reject or alert_only |
dry_run | bool | 0 | 1: log and record violations without rejecting logins or creating temp bans. 0: enforce live |
license_key | text | empty | License key from FXOpsPro, for example FXO-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX |
license_server | text | https://plugins.fxopspro.com | License server address |
Security



