Guide  →  Hotspot & RADIUS on RouterOS

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:

  1. 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.
  2. 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.
  3. Login. The subscriber enters the voucher's username and password. RouterOS forwards this to RADIUS with service=hotspot — a separate service type from PPPoE's service=ppp, so the same RADIUS server can run both without conflict.
  4. Accounting starts. Same as PPPoE — Start, Interim-Update every 5 minutes, Stop — so the voucher's remaining time or data balance can be tracked.
Device joins Wi-Fi DHCP Gets IP address, not authenticated First HTTP request Router intercepts, redirects to login page Voucher entered Router asks RADIUS service=hotspot RADIUS Server Accept / Reject On accept Session starts — accounting Start sent No software installed Owns voucher database

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

BlockPurpose
/ip poolThe address range handed to connecting clients.
/ip dhcp-serverGives clients an IP before any login — required, not optional, for hotspot to work at all.
/radiusservice=hotspot — separate registration from PPPoE's RADIUS entry, same server.
/ip hotspot profileThe login hostname and RADIUS interim-update interval.
/ip hotspotBinds the profile and pool to your access interface.
/ip hotspot walled-gardenOptional — 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.

Every parameter, explained

FieldAcceptsDefaultNotes
Hotspot interfaceInterface name (e.g. ether3)ether3The interface your access points connect to. Required.
Router gateway IPIPv4 address10.20.20.1Becomes hotspot-address — the router's own IP inside the hotspot subnet.
Network (CIDR)IPv4 CIDR block10.20.20.0/24Should describe the same subnet as the gateway IP and pool.
Client pool rangeTwo IPv4 addresses, start-end10.20.20.10-10.20.20.254Addresses actually handed to connecting devices via DHCP.
DNS serversComma-separated IPv4 addresses8.8.8.8,1.1.1.1Pushed via DHCP.
Login page hostnameAny text — doesn't need to be a real domainlogin.mynetwork.comShown in the subscriber's browser during login.
Walled garden domainDomain namenoneOptional — only needed if subscribers must reach a payment page before logging in.
RADIUS server IPIPv4 addressnone — placeholder if blankRequired for a working config.
Shared secretTextnone — placeholder if blankMust match the RADIUS server's configured secret exactly. Required.

Full example: a voucher hotspot at a shared compound

A common scenario: a residential compound or small business area selling time-based vouchers, with SAS4 as the RADIUS platform on the same LAN as the router.

FieldValue used
Hotspot interfaceether3 (access point uplink)
Router gateway IP10.20.20.1
Network10.20.20.0/24
Client pool range10.20.20.10-10.20.20.254
Login page hostnamelogin.mynetwork.com
Walled gardenpayments.example.com — so unpaid users can still reach the voucher purchase page
RADIUS server IP192.168.88.10 (SAS4 on the same LAN)

Common mistakes and how to fix them

SymptomLikely causeFix
Devices connect to WiFi but never see the login pageNo DHCP server on the hotspot interface, so devices never get an IPConfirm /ip dhcp-server print shows the hotspot interface enabled
Login page loads but voucher codes are always rejectedRADIUS registered with service=ppp instead of service=hotspotCheck /radius print — the service field must say hotspot for this generator's output
Subscribers can't reach the payment page before logging inWalled garden domain left blank or doesn't match the actual payment URLAdd the exact domain used by the payment page to the walled garden field
RADIUS accounting shows no usage dataradius-interim-update missing or RADIUS not logging accounting packetsConfirm the hotspot profile has radius-interim-update=5m and the RADIUS server's accounting log is receiving packets on port 1813

Best practices

  • Size the client pool for peak concurrent devices, not just active subscribers — idle phones and routers often hold a lease.
  • Only add a walled garden entry if you're actually selling vouchers through a web page reachable before login.
  • Test one voucher end to end — purchase, login, session start — before printing a full batch.
  • Keep the login page hostname consistent across support documentation, since that's what subscribers will actually see and reference.
RouterOS version: this generator's output is built and tested against RouterOS v7.x. It hasn't been separately verified against RouterOS v6.

Ready to generate your config?

Fill in your interface and RADIUS details and get a ready-to-import .rsc file in seconds.

Open the Hotspot generator →