RouterOS Library

MikroTik Scripts

Hotspot Users

All categories
Hotspot Users

Bulk Change Data Limit by Comment

Sets a new total data limit (limit-bytes-total) for all hotspot users that share the same comment.

Hotspot Users

Bulk Change Hotspot User Comment

Finds every hotspot user that has a given comment (usually a batch/card series name) and replaces it with a new comment.

Hotspot Users

Bulk Change Hotspot User Profile

Moves every hotspot user from one user profile to another (for example from ‘default’ to ‘2m’).

Hotspot Users

Bulk Change Uptime Limit by Comment

Sets a new uptime limit (limit-uptime) for all hotspot users that share the same comment.

Hotspot Users

Calculate Total Hotspot Data Usage

Adds up download + upload bytes of all hotspot users and prints the total in bytes, MB and GB.

Hotspot Users

Hotspot Blacklist to MAC Block

Companion to the brute-force rules: for every IP in the hotspot_blacklist it finds the MAC address from the ARP table, adds a permanent 'blocked' IP binding for that MAC and removes the IP from the list. Useful when the DHCP lease is short…

Hotspot Users

Hotspot Brute-Force Protection (Firewall Rules)

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

Hotspot Users

Hotspot Hosts Table Cleanup

Removes hotspot hosts that are neither authorized nor bypassed, so the Hosts table does not fill with stale entries. Runs from the Scheduler.

Hotspot Users

Hotspot On-Logout: Disconnect Shared Sessions

Paste into a hotspot user profile’s On Logout field. When a session ends because a limit was reached, all other active sessions of the same user are removed immediately.

Hotspot Users

Lock Hotspot User to First Device (MAC Binding)

On-Login script: when a voucher is used for the first time it saves the device's MAC address in the user, so the same voucher cannot be used on other devices afterwards.

Hotspot Users

NetCut Protection Rules

Firewall, mangle and queue rules that detect hosts generating NetCut-style NetBIOS traffic (UDP 137) and throttle them to 1 kbps for one minute at a time.

Hotspot Users

Remove Passwords from All Hotspot Users (QR Login)

Clears the password of every hotspot user that has one, so cards generated with QR codes log in with the username only.

Hotspot Users

Shared Users Limit Check - Active Sessions

When one account is logged in on several devices, each session is counted separately. This script adds up all active sessions per user and logs them out when the combined traffic passes your limit. Run it from the Scheduler.

Hotspot Users

Shared Users Limit Check - Per-User Data Limit

Reads each user’s own limit-bytes-total and logs out all of that user’s active sessions once the user’s total traffic reaches it. Nothing to edit - limits come from the users themselves.