MikroTik Hotspot + RADIUS:
how voucher billing actually works
The generator builds the config. This page covers what's actually happening when a client connects — and the two things (DNS and HTTPS) that break more hotspot deployments than anything else.
Why hotspot instead of PPPoE
PPPoE assumes a subscriber has a router or app dialing in with credentials — fine for a fixed installation with a dish and an indoor unit. It's the wrong model for walk-up access: a customer buying a one-day voucher at a shop, a hotel guest, a café. Nobody's installing PPPoE client software on a phone for a coffee shop.
Hotspot solves this with a captive portal: the device connects to open (or WPA-protected) Wi-Fi like any normal network, gets an IP address immediately, and only sees a login page — no software, no configuration, just a username and password printed on a card.
The actual connection sequence
This is the part most tutorials skip, and it's the key to debugging anything that goes wrong:
- DHCP first. The device joins the Wi-Fi and gets an IP from the pool — before any authentication. This is why the generator includes a full DHCP server block; without it, the device never even gets an address.
- Interception. RouterOS watches for the client's first HTTP request and, since the session isn't authenticated yet, redirects it internally to the router's own login page instead of letting it reach the real destination.
- Login. The subscriber enters the voucher's username and password. RouterOS forwards this to RADIUS with
service=hotspot— a separate service type from PPPoE'sservice=ppp, so the same RADIUS server can run both without conflict. - Accounting starts. Same as PPPoE — Start, Interim-Update every 5 minutes, Stop — so the voucher's remaining time or data balance can be tracked.
The two things that actually break deployments
DNS resolution for the login page
The dns-name field (what shows in the browser, like login.mynetwork.com) needs to resolve to the router for hotspot clients specifically. If your DHCP hands out external DNS servers directly (8.8.8.8, 1.1.1.1 — the generator's default), those servers obviously have no idea your login hostname exists, and resolution can fail before the client even reaches the interception step.
In practice RouterOS's own DNS handling and the interception mechanism cover most cases automatically, but if you see subscribers stuck on "page not found" instead of the login page, this is the first thing to check — try pointing the DHCP DNS server at the router's own IP instead of an external resolver, so it can answer for the hotspot hostname itself.
HTTPS everywhere
Almost all web traffic today is HTTPS, and RouterOS can't transparently intercept an HTTPS request the way it can HTTP — doing so would trigger a certificate warning, since the router isn't the real destination. This is a limitation of every captive portal system, not just MikroTik's.
In practice this is less of a problem than it sounds: modern phones and laptops run their own captive portal detection (a background probe to a known HTTP URL right after connecting) and pop the login page automatically. But on older devices, or if that detection fails, a subscriber staring at a browser that only opens HTTPS sites will never see the redirect. Printing "open any non-HTTPS site, or wait for the login popup" on the voucher card heads off a lot of support questions.
Reading the generated script
| Block | Purpose |
|---|---|
/ip pool | The address range handed to connecting clients. |
/ip dhcp-server | Gives clients an IP before any login — required, not optional, for hotspot to work at all. |
/radius | service=hotspot — separate registration from PPPoE's RADIUS entry, same server. |
/ip hotspot profile | The login hostname and RADIUS interim-update interval. |
/ip hotspot | Binds the profile and pool to your access interface. |
/ip hotspot walled-garden | Optional — lets one domain (a payment page, for instance) load before login. |
Vouchers themselves aren't created here: this script only wires the router to your RADIUS platform. Actually generating and printing voucher batches happens in SAS4, GalaxyRAD, or whatever billing platform you're running.
Test with one device on your own phone's hotspot first before connecting it to your live access point — it isolates whether an issue is the router config or the wireless setup itself.
Ready to generate your config?
Fill in your interface and RADIUS details and get a ready-to-import .rsc file in seconds.