Implements automated detection and blocking of IPs exhibiting scanning behavior (5+ unique 404s within 1 minute). Key features: - Progressive ban escalation (5 min → 1 hour → permanent) - CIDR range and exact IP whitelisting - Redis-backed 404 path tracking with 60s TTL - Cloudflare WAF integration for permanent bans - Admin UI for whitelist and blocked IP management - Oban cron jobs for cleanup (expired bans, stale violations) - ETS caching for whitelist performance Components: - Plug: ToweropsWeb.Plugs.BruteForceProtection - Context: Towerops.Security.BruteForce - Schemas: IpBlock, IpWhitelist - Workers: CloudflareBanWorker, ExpiredBanCleanupWorker, StaleViolationCleanupWorker - Admin UI: /admin/security (superuser only) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| api_auth.ex | ||
| brute_force_protection.ex | ||
| capture_timezone.ex | ||
| check_policy_consent.ex | ||
| detect_eu_user.ex | ||
| mobile_auth.ex | ||
| rate_limit.ex | ||
| remote_ip_logger.ex | ||
| security_headers.ex | ||
| update_session_activity.ex | ||
| webhook_auth.ex | ||