Enable Hotspot
- IP → Hotspot → run setup wizard
- Select guest WiFi interface or bridge
- Leave RADIUS unchecked
Captive Portal · Firoz Mahmud
Configure MikroTik HotSpot so guests are redirected to the login page, submit the form, and get full internet access.
Guest login page (already live)
Open the login URL in a browser first to confirm the form loads, then configure the router.
The router must redirect guests — typing the URL manually will not pass the device MAC.
You configure the router only — the portal handles the login page and guest records.
Portal is already live on the internet — you only configure the MikroTik router.
mac= the form cannot unlock internet.MikroTik replaces $(mac) etc. automatically when the guest is redirected.
| Parameter | MikroTik | Purpose |
|---|---|---|
| Device MAC | $(mac) | Guest identity (required) |
| Unlock endpoint | $(link-login-only) | Portal POST target (required) |
| Original site | $(link-orig) | Post-login redirect |
| Guest IP | $(ip) | Records (optional) |
Portal POSTs to $(link-login-only) using HotSpot user portal-guest — password must match portal config.
Hotspot → Server Profiles → Login
https://captive-portal.firozmahmud.dev/login?mac=$(mac)&ip=$(ip)&link-login-only=$(link-login-only)&link-orig=$(link-orig)
Allow portal before login
/ip hotspot walled-garden add dst-host=captive-portal.firozmahmud.dev
Password must match the portal · HTTP PAP
/ip hotspot user add name=portal-guest password=<portal-password> profile=default /ip hotspot user profile set [find default] shared-users=100
Login By → HTTP PAP. Replace hotspot/login.html:
<form action="https://captive-portal.firozmahmud.dev/login" method="get"> <input type="hidden" name="mac" value="$(mac)"> <input type="hidden" name="ip" value="$(ip)"> <input type="hidden" name="link-login-only" value="$(link-login-only)"> <input type="hidden" name="link-orig" value="$(link-orig)"> </form> <script>document.forms[0].submit();</script>
/ip hotspot walled-garden add dst-host=captive-portal.firozmahmud.dev
Portal username portal-guest and the same password on the router.
/ip hotspot user add name=portal-guest password=<portal-password> profile=default
mac=/ip hotspot active print| Problem | Likely cause | Fix |
|---|---|---|
| Login page never appears | Walled garden missing | Add walled garden for captive-portal.firozmahmud.dev |
device id missing | No MAC in URL | Add $(mac) to splash URL; guest must come from HotSpot redirect |
| No internet after submit | Wrong HotSpot password | Match HotSpot user password with portal |
| No internet after submit | Missing link-login-only | Fix splash URL / HTML — include link-login-only |
| Works in browser, not on WiFi | Router not redirecting | Check HotSpot profile and splash URL |
$(mac) and $(link-login-only)captive-portal.firozmahmud.devmac= in URL)