MikroTik Hotspot Setup: Guest Wi-Fi with a Login Page

Give guests internet access through a login page, with speed limits and time limits you control.

A MikroTik Hotspot puts a login page in front of a network. Users connect, a page opens, and they get internet only after entering a username and password. It is the standard way to run guest Wi-Fi in hotels, cafes, offices and campuses.

Analogy: a hotspot is like a building reception that hands out visitor passes. Each pass has a name, an expiry time and the floors it opens. When the pass expires, the door stops opening.

Before you start

  • The router already has internet (see MikroTik basic setup).
  • Decide which interface the guests use, for example a separate bridge or port called guest, so guests stay apart from your office LAN.
  • Give that interface its own network, for example 10.5.50.1/24.
/interface bridge add name=guest
/interface bridge port add bridge=guest interface=ether5
/ip address add address=10.5.50.1/24 interface=guest

Step 1: Run the setup wizard

/ip hotspot setup

The wizard asks a few questions. For a first hotspot, accept the suggested values and answer like this:

  • Hotspot interface: guest
  • Local address of network: 10.5.50.1/24
  • Masquerade network: yes
  • Address pool of network: 10.5.50.2-10.5.50.254
  • SSL certificate: none (fine for learning)
  • DNS servers: your router or public DNS
  • DNS name: a name for the login page, for example login.guest
  • Local hotspot user: create a first test user

The wizard creates the hotspot server, a DHCP server for guests, the NAT rule and the login page in one go.

Step 2: Create user profiles with speed limits

A user profile is a template: every user on it gets the same limits.

/ip hotspot user profile add name=guest-2M rate-limit=1M/2M shared-users=1
/ip hotspot user profile add name=staff-10M rate-limit=5M/10M shared-users=2

rate-limit=1M/2M means 1 Mbps upload and 2 Mbps download for each user. shared-users is how many devices can log in with the same account at once.

Step 3: Add users

/ip hotspot user add name=room101 password=Sea-Breeze-42 profile=guest-2M limit-uptime=1d
/ip hotspot user add name=visitor1 password=Blue-Door-17 profile=guest-2M limit-uptime=2h

limit-uptime sets how long the account can be online in total. When it runs out, the user is logged out and can't log in again.

Step 4: Test and monitor

Connect a phone or laptop to the guest network. A login page should open (or open any http website to trigger it). Log in with a test user, then check from the router:

/ip hotspot active print
/ip hotspot host print

active lists logged-in users; host lists every device the hotspot has seen, logged in or not.

If the login page doesn't appear

  • Make sure the device got a 10.5.50.x address. If not, check the hotspot DHCP server.
  • Try an http:// address. Modern phones often open https sites first, which can't be redirected without a valid certificate.
  • Check that the hotspot server is on the right interface: /ip hotspot print.

Going further

For many users, vouchers and billing, hotspots are usually connected to a RADIUS server such as MikroTik User Manager. This is covered in the MTCUME (User Management Engineer) course. See all MikroTik certifications.