Contact

MikroTik Hotspot en mode pont : le guide complet de production

Accueil / Blog

7 min de lecture
ZILL E ALImai 20, 2026Réseautage

A correctly built MikroTik hotspot bridge mode deployment should be invisible to the network and obvious to the user.

Running a MikroTik hotspot in bridge mode lets you drop a RouterOS box into an existing layer-2 network without renumbering a single subnet. Done right, it is invisible to the network and obvious to the user. Done wrong, half your clients never see the splash page and the other half walk straight past it.

This is the exact configuration I deploy on cafés, hostels, and small ISP hotspot zones, plus the mistakes that cost me the most call-outs.

When bridge mode is the right choice

Use bridge mode when:

  • The gateway and DHCP already exist and you cannot change them (hotel, campus, shared building).
  • You need the hotspot to be removable — pull the box and the network still works.
  • Multiple APs already share one flat VLAN and re-addressing them is not on the table.

Use routed mode instead when you own the whole edge. Routing is simpler to reason about, and every "clients are invisible" ticket disappears.

MikroTik hotspot bridge mode: transparent bridge topology with upstream gateway, hotspot on bridge-hotspot with use-ip-firewall, then APs and clients

The Minimum Working MikroTik Hotspot Bridge Mode Config

/interface bridge add name=bridge-hotspot protocol-mode=none /interface bridge settings set use-ip-firewall=yes /interface bridge port add bridge=bridge-hotspot interface=ether2 add bridge=bridge-hotspot interface=ether3 /ip pool add name=hs-pool ranges=10.20.0.10-10.20.0.254 /ip dhcp-server add address-pool=hs-pool interface=bridge-hotspot name=hs-dhcp disabled=no /ip hotspot profile set [find default=yes] use-radius=yes login-by=http-chap,mac-cookie html-directory=hotspot /ip hotspot add address-pool=hs-pool interface=bridge-hotspot name=hotspot1 profile=default

The single most important line is use-ip-firewall=yes. Without it, bridged frames never enter the IP firewall — and the hotspot's redirect rules live in the IP firewall. Everything else can be perfect and clients will still ride straight past the login page.

Trade-off worth knowing: use-ip-firewall pushes bridged traffic through the firewall path, which raises CPU on low-end hardware. On an hEX or hAP ac² you will feel it above roughly 150–200 concurrent users. Plan a CCR or RB5009 above that.

Where the DHCP server must live

This is the second most common failure. The hotspot only sees a client as "active" if it learns the client's IP-to-MAC binding. If an upstream router hands out addresses, RouterOS sees MAC addresses with no leases and the session table stays empty.

Two valid options:

  1. Move DHCP onto the RouterOS box (shown above) — simplest, most reliable.
  2. Keep upstream DHCP and add /ip dhcp-relay on the bridge so leases pass through RouterOS.

Walled garden essentials

Modern devices probe a known URL to decide whether they are behind a captive portal. Block the probe and the user sees "connected, no internet" even after a successful login.

Host Why it matters
connectivitycheck.gstatic.com Android and ChromeOS portal detection
captive.apple.com iOS and macOS portal detection
www.msftconnecttest.com Windows 10/11 portal detection
Your payment gateway domain Paid vouchers must load before auth
/ip hotspot walled-garden add dst-host=connectivitycheck.gstatic.com add dst-host=captive.apple.com add dst-host=*.msftconnecttest.com

Add DNS to the IP-level walled garden too, otherwise name resolution for those hosts fails before HTTP is ever attempted:

/ip hotspot walled-garden ip add action=accept dst-address=8.8.8.8 protocol=udp dst-port=53

Bandwidth limits without a RADIUS server

For a single-site deployment that does not justify RADIUS yet, per-user rate limiting lives directly in the hotspot user profile – no separate queue configuration needed:

/ip hotspot user profile add name=guest-tier rate-limit=2M/8M shared-users=1 /ip hotspot user add name=guest01 password=<voucher-code> profile=guest-tier

The rate-limit syntax here is rx/tx from the client’s perspective, which is the opposite convention from the Mikrotik-Rate-Limit RADIUS attribute discussed in the PPPoE/FreeRADIUS setup – worth double-checking if you run both hotspot and PPPoE on the same network, since mixing up the two conventions is an easy mistake. shared-users=1 stops one voucher code being pasted into three phones in the same café – raise it deliberately for a family-plan style voucher, never leave it unset by accident.

Branding the login page without breaking portal detection

The files under RouterOS’s hotspot HTML directory (referenced in the profile config above) are plain HTML/CSS, editable via Winbox’s file manager or SFTP. Two things break more login pages than anything else:

  • Loading external assets (fonts, images, scripts) from the open internet before authentication. The walled garden blocks exactly this by design, so a login page referencing fonts.googleapis.com renders broken until every such host is added to the walled garden – or, simpler, host logo and font files locally inside the hotspot directory itself.
  • A login form that does not match the variable names RouterOS expects (username, password, the hidden dst field for post-login redirect). Start from the default login.html template and restyle it rather than rebuilding the form from scratch – the variable names are what actually authenticates the session, not the visual design around them.

Closing the common bypasses

MAC cloning. A user copies the MAC of an authorised device and inherits the session. Bind sessions to MAC et IP, and keep mac-cookie lifetimes short (a working day, not a month):

/ip hotspot profile set [find default=yes] mac-cookie-timeout=1d

Static IP self-assignment. A user sets a manual address in your subnet and skips DHCP. Drop unauthenticated forwarding at the firewall:

/ip firewall filter add chain=forward src-address=10.20.0.0/24 hotspot=!auth action=drop \ comment="Block non-authenticated hotspot subnet"

DNS tunnelling. Restrict outbound port 53 to the router itself and force clients through it:

/ip firewall nat add chain=dstnat protocol=udp dst-port=53 action=redirect to-ports=53 \ in-interface=bridge-hotspot

Verifying the deployment

Work down this list before you leave site:

  1. /ip hotspot active print — a freshly logged-in client shows MAC et IP. IP missing means DHCP placement is wrong.
  2. /ip hotspot host print — unauthenticated devices should appear here. Empty table means use-ip-firewall is off.
  3. Connect an iPhone and an Android handset. Both should auto-open the portal. Only one working means a walled-garden entry is missing.
  4. Set a manual IP on a laptop. It must have no internet.
  5. /tool profile under load — if the firewall process is pegged, the hardware is undersized for bridge mode.

RADIUS: when to add it

For a single site, local hotspot users are fine. Move to RADIUS the moment you have more than one site, need per-plan bandwidth profiles, or want usage accounting for billing. FreeRADIUS with a MySQL or PostgreSQL backend handles thousands of concurrent sessions on modest hardware, and rate limits arrive as a Mikrotik-Rate-Limit attribute rather than being hard-coded per router.

That is exactly the layer NexaLink automates — plans, vouchers, and per-user rate limits pushed to every RouterOS box from one panel.

Troubleshooting: portal loads but login fails

This specific symptom – the splash page itself renders, but submitting credentials does nothing or errors – has a short, ordered list of real causes:

  1. Clock skew between RouterOS and the browser’s device. Hotspot authentication is time-sensitive (the MD5-CHAP challenge has a short validity window); a RouterOS clock that drifted because NTP is misconfigured causes logins to silently fail. Check /system clock print and confirm NTP client is enabled.
  2. A stale session for the same MAC still active. Check /ip hotspot active print for a zombie session from a previous disconnect that never cleaned up – remove it manually and retry.
  3. HTTPS redirect loop on modern phones. iOS and Android both now prefer HTTPS by default, and a captive portal cannot terminate HTTPS for domains it does not hold certificates for. Confirm /ip hotspot profile has login-by=http-chap,mac-cookie (not HTTPS-only) and that the walled garden entries use plain HTTP where the OS portal-detection probe expects it.

Field checklist

  • use-ip-firewall=yes on bridge settings
  • DHCP on the RouterOS box or relayed through it
  • Walled garden covers Android, iOS, Windows, DNS, payment gateway
  • Forward drop rule for hotspot=!auth
  • Portal tested on two phone platforms and a laptop
  • Configuration exported and stored off-box

Get those six right and the hotspot stops generating tickets.

Écrit par

ZILL E ALI

Ingénieur réseau certifié MTCNA et MTCRE, spécialiste de l'infrastructure ISP et fondateur de Developer Zon. Écrit ici sur MikroTik, Cisco, l'infrastructure ISP et occasionnellement des journaux de construction.

Laisser une réponse

Ce site utilise Akismet pour réduire le spam. Découvrez comment vos données de commentaire sont traitées.