Hotspot Users

Hotspot Brute-Force Protection (Firewall Rules) — v6 & v7

Detects repeated 'invalid username or password' responses and blacklists the offending IP for 3 hours (all its TCP traffic to the router is dropped).

MikroTik Version

RouterOS v6 & v7

/ip firewall filter
# EN: 1) Drop everything coming from blacklisted addresses | AR: 1) حظر كل ما يأتي من العناوين الموجودة في القائمة السوداء
add chain=input protocol=tcp src-address-list=hotspot_blacklist action=drop comment="Hotspot brute-force: drop listed IPs"
# EN: 2) Allow the first few failed logins (rate limit 2 per minute, burst 4)
# AR: 2) السماح بأول محاولات فاشلة (2 في الدقيقة وبحد أقصى 4 دفعة واحدة)
add chain=output protocol=tcp content="invalid username or password" dst-limit=2/1m,4,dst-address/2m action=accept comment="Hotspot brute-force: allow first failures"
# EN: 3) Failures above the limit put the client in the blacklist for 3 hours
# AR: 3) المحاولات الفاشلة الزائدة تضع العميل في القائمة السوداء لمدة 3 ساعات
add chain=output protocol=tcp content="invalid username or password" action=add-dst-to-address-list address-list=hotspot_blacklist address-list-timeout=3h comment="Hotspot brute-force: blacklist offender"