Skip to content

User Profiles

HotSpot user profiles define the policy applied to a group of users: session duration, bandwidth limits, quota, MAC cookie behaviour, queue integration, and login/logout hooks. Each user references a profile; users without an explicit profile assignment use the default profile.

Most limits can be set at the profile level (shared across many users) or overridden at the individual user level:

SettingProfile PathPer-User Override
Session timeoutsession-timeout
Idle timeoutidle-timeout
Rate limitrate-limitrate-limit on user
Data quotalimit-bytes-*limit-bytes-*, limit-uptime on user
Shared usersshared-users
MAC cookieadd-mac-cookie

When both a profile and a per-user value are set, the per-user value takes precedence.

# Create a profile
/ip hotspot user profile
add name=standard \
session-timeout=8h \
idle-timeout=30m \
rate-limit=5M/10M \
shared-users=1 \
add-mac-cookie=yes
# Assign a user to the profile
/ip hotspot user
add name=alice password=secret123 profile=standard
ParameterDescriptionDefault
session-timeoutMaximum session duration. Session ends after this time and user must re-authenticate. 0 = unlimited.0
idle-timeoutDisconnect after this period of inactivity (no data flowing). 0 = never disconnect for inactivity.0
keepalive-timeoutHow long to keep an idle session open while the keepalive mechanism is running.2m
# 8-hour daily session with 20-minute idle cutoff
/ip hotspot user profile
add name=daily \
session-timeout=8h \
idle-timeout=20m \
keepalive-timeout=2m

The rate-limit parameter controls per-session upload and download speed using RouterOS’s queue rate-limit syntax.

rx-rate[/tx-rate] [rx-burst-rate[/tx-burst-rate] rx-burst-threshold[/tx-burst-threshold] rx-burst-time[/tx-burst-time] [priority] [rx-rate-min[/tx-rate-min]]]
  • rx = download (from client’s perspective: bytes arriving at the client)
  • tx = upload (bytes leaving the client)
  • Rates are specified as numbers with a suffix: k (kilobits), M (megabits), G (gigabits)
# 5 Mbps download, 2 Mbps upload
rate-limit=5M/2M
# 10 Mbps symmetric
rate-limit=10M/10M
# Burst: 20M download burst up to 20M threshold for 10 seconds, then sustain at 5M
rate-limit="5M/2M 20M/10M 1M/512k 10s"
# With minimum guaranteed rate (RouterOS 7 PCQ)
rate-limit="5M/2M 10M/5M 1M/512k 10s 8 1M/512k"
# Override rate limit for a specific user (ignores profile value)
/ip hotspot user
set [find name=vip] rate-limit=50M/20M

Quotas track cumulative data transfer and disconnect the user when the limit is reached.

ParameterDescription
limit-bytes-inMaximum bytes the user may download
limit-bytes-outMaximum bytes the user may upload
limit-bytes-totalCombined download + upload limit
limit-uptimeMaximum cumulative session time (across all sessions)
# 1 GB total data quota
/ip hotspot user profile
add name=quota-1gb limit-bytes-total=1073741824
# Using unit suffixes (RouterOS 7)
/ip hotspot user profile
add name=quota-500mb limit-bytes-total=500M
# Per-user override with a tighter time limit
/ip hotspot user
add name=guest1 profile=standard limit-uptime=2h limit-bytes-total=200M

shared-users controls how many devices can authenticate simultaneously using the same credentials.

# One device at a time (enforce single-session)
/ip hotspot user profile
add name=single shared-users=1
# Up to 5 devices (e.g., family plan)
/ip hotspot user profile
add name=family shared-users=5
# Unlimited concurrent sessions
/ip hotspot user profile
add name=open shared-users=unlimited

When shared-users=1 and a second device attempts to log in with the same credentials, the first session is disconnected.

MAC cookies allow a device to reconnect to HotSpot without entering credentials again, identified by its MAC address.

ParameterDescriptionDefault
add-mac-cookieEnable MAC cookie for sessions in this profileyes
mac-cookie-timeoutHow long the cookie is valid after the session ends3d
/ip hotspot user profile
add name=standard \
add-mac-cookie=yes \
mac-cookie-timeout=7d

When a client reconnects within the cookie validity window, HotSpot authenticates it automatically without showing the login page.

open-status-page controls whether and when the session status page is shown to the user after login.

ValueBehaviour
alwaysAlways open status page after login
neverNever open status page
http-loginOpen status page only if login was over HTTP (not HTTPS)
/ip hotspot user profile
add name=standard open-status-page=http-login

Trial mode grants unauthenticated users limited free access before requiring login.

ParameterDescription
trial-uptimeHow long trial access lasts (e.g., 10m)
trial-user-limitMax simultaneous trial users (per server)
trial-uptime-limitAlternative per-user trial uptime cap
# 10-minute trial, up to 20 simultaneous trial users
/ip hotspot user profile
add name=default \
trial-uptime=10m \
trial-user-limit=20

Trial users are tracked by MAC address. After the trial expires, they are redirected to the login page.

Assign a separate IP pool to users in a profile:

/ip pool
add name=pool-premium ranges=10.5.50.200-10.5.50.230
/ip hotspot user profile
add name=premium address-pool=pool-premium

This is useful for assigning different subnets to different user tiers (e.g., to apply different firewall policies by subnet).

HotSpot creates a per-session simple queue for rate limiting. You can integrate sessions into a PCQ or HTB parent queue for fair sharing across all hotspot users.

ParameterDescription
parent-queueName of the parent queue to attach the per-session queue to
queue-typeQueue type to use for the session queue (e.g., pcq-download-default)
# Create a parent queue that caps total guest bandwidth
/queue simple
add name=hs-total max-limit=100M/50M target=br-guest
# Assign sessions to the parent queue
/ip hotspot user profile
add name=standard \
rate-limit=5M/2M \
parent-queue=hs-total

HotSpot can apply packet marks to authenticated sessions, enabling policy routing, QoS, or traffic accounting in the firewall and mangle chains.

ParameterDescription
incoming-packet-markMark applied to packets arriving from the client
outgoing-packet-markMark applied to packets leaving toward the client
/ip hotspot user profile
add name=premium \
incoming-packet-mark=hs-premium-in \
outgoing-packet-mark=hs-premium-out
# Use marks in mangle/QoS rules
/ip firewall mangle
add chain=forward packet-mark=hs-premium-in action=set-priority new-priority=1 \
comment="Prioritize premium upload traffic"

Route authenticated session traffic through custom firewall chains for per-profile filtering:

ParameterDescription
incoming-filterFirewall filter chain name applied to incoming (client upload) traffic
outgoing-filterFirewall filter chain name applied to outgoing (client download) traffic
# Create a custom chain
/ip firewall filter
add chain=hs-guest-in action=drop protocol=tcp dst-port=25 \
comment="Block SMTP from guests"
# Apply chain to profile
/ip hotspot user profile
add name=guest incoming-filter=hs-guest-in

Enable transparent HTTP proxy for sessions in this profile:

/ip hotspot user profile
add name=standard transparent-proxy=yes

When enabled, HTTP traffic from authenticated users is redirected to the router’s web proxy. Requires /ip proxy to be enabled and configured.

Run RouterOS scripts automatically when a user logs in or out:

ParameterDescription
on-loginScript name or inline script to execute on session start
on-logoutScript name or inline script to execute on session end

Scripts receive the following environment variables:

VariableDescription
usernameHotSpot username
macClient MAC address
ipClient IP address
serverHotSpot server name
session-idUnique session identifier
timeoutSession timeout value
limit-uptimeUser’s uptime limit
# Log login events to a file
/system script
add name=hs-on-login source={
/log info message=("HotSpot login: " . $username . " from " . $ip)
}
# Apply the script to a profile
/ip hotspot user profile
add name=standard on-login=hs-on-login

The advertise feature periodically opens a new browser window on authenticated clients to display an advertisement or notification page.

ParameterDescriptionDefault
advertiseEnable advertisement injectionno
advertise-urlURL to open for the advertisement
advertise-intervalHow often to show the advertisement
advertise-timeoutHow long the ad window stays open
/ip hotspot user profile
add name=free-tier \
advertise=yes \
advertise-url=http://ads.example.com/hotspot-ad \
advertise-interval=30m \
advertise-timeout=30s
/ip hotspot user profile
add name=guest-free \
session-timeout=2h \
idle-timeout=15m \
rate-limit=2M/5M \
shared-users=1 \
add-mac-cookie=yes \
mac-cookie-timeout=1d \
open-status-page=http-login \
trial-uptime=10m \
trial-user-limit=50
/ip hotspot user profile
add name=voucher-1gb \
rate-limit=10M/10M \
limit-bytes-total=1073741824 \
shared-users=1 \
add-mac-cookie=no \
session-timeout=24h
/ip hotspot user profile
add name=premium \
rate-limit=50M/20M \
shared-users=3 \
add-mac-cookie=yes \
mac-cookie-timeout=30d \
session-timeout=0 \
idle-timeout=0 \
open-status-page=never

For staff devices that should bypass authentication entirely, use an IP binding rather than a user profile:

/ip hotspot ip-binding
add mac-address=AA:BB:CC:DD:EE:FF type=bypassed comment="Staff laptop"
# View all users and their profiles
/ip hotspot user print
# View user statistics (bytes, uptime)
/ip hotspot user print stats
# Reset counters for a user
/ip hotspot user reset-counters [find name=alice]
# Disconnect an active session
/ip hotspot active remove [find user=alice]
# View active sessions
/ip hotspot active print detail