Sign in Start free

Step 5 of 7

The hotspot settings

The walled garden and login settings the page needs.

The setup command sets these for you. Paste them yourself only if the router was set up before, or someone changed them. They switch on login by code, let phones reach Kawifi before paying, and use the uploaded page.

Winbox › New Terminal
# 1. Login by MAC, the voucher code (CHAP and PAP), cookie and MAC cookie; everything except HTTPS
/ip hotspot profile set [find] login-by=mac,http-chap,http-pap,cookie,mac-cookie http-cookie-lifetime=30d
# A device out of reach for up to 10 minutes keeps its session; after that, MAC cookie logs it back in
/ip hotspot user profile set [find] keepalive-timeout=10m
# 2. Let customers reach Kawifi before they log in (prices, campaigns, mobile money)
/ip hotspot walled-garden remove [find comment="kawifi"]
/ip hotspot walled-garden add dst-host=app.kawifi.net comment="kawifi"
/ip hotspot walled-garden ip remove [find comment="kawifi"]
/ip hotspot walled-garden ip add dst-host=app.kawifi.net action=accept comment="kawifi"
# 3. Use the Kawifi login page (after uploading the hotspot folder from Captive portal)
/ip hotspot profile set [find] html-directory=hotspot
login-by
Customers log in with their code, and come back without typing it again (cookie and MAC cookie).
keepalive-timeout
A phone out of reach for up to 10 minutes keeps its session.
walled-garden
Phones can open Kawifi before logging in, to see prices and pay.
html-directory
The hotspot shows the page in the uploaded hotspot folder.

Without the walled garden lines, the login page shows but the packages and the mobile money button do not load.