MikroTik Hotspot Setup: Login Page, Users and Speed Limits (Step by Step)
By Madan Kc, ISP/GPON engineer at DG Link Network · Updated
Quick answer: A MikroTik hotspot shows a login page to anyone who joins your Wi-Fi or LAN until they sign in. To set one up: give a bridge or interface its own subnet, add a DHCP server for it, run /ip hotspot setup, then add users with /ip hotspot user add and limit them with a user profile. The wizard creates most of the rules for you, but internet access still needs a working NAT rule on the WAN side.
What you need before you start
- A MikroTik router with working internet on one port (WAN, here
ether1) and NAT already masquerading it. If not, add/ip firewall nat add chain=srcnat out-interface=ether1 action=masquerade. - A separate port or bridge for the guest or customer side (here
bridge-hs). Do not run the hotspot on the same interface as your management network. - DNS working on the router:
/ip dns set servers=8.8.8.8,1.1.1.1 allow-remote-requests=yes. - A subnet for hotspot clients. This guide uses 10.5.50.0/24.
Commands are for RouterOS 6 and 7. Change interface names and addresses to match yours, and take a configuration backup before you start.
Step 1: Address, pool and DHCP
Not sure how large a subnet the hotspot needs? Work out the mask, usable hosts and address range with the IP subnet calculator first.
/interface bridge add name=bridge-hs
/interface bridge port add bridge=bridge-hs interface=ether3
/ip address add address=10.5.50.1/24 interface=bridge-hs
/ip pool add name=hs-pool ranges=10.5.50.10-10.5.50.254
/ip dhcp-server add name=dhcp-hs interface=bridge-hs address-pool=hs-pool disabled=no
/ip dhcp-server network add address=10.5.50.0/24 gateway=10.5.50.1 dns-server=10.5.50.1Check that a test device on ether3 gets an address in 10.5.50.0/24 before moving on. If it does not, fix DHCP first: the hotspot cannot work without it.
Step 2: Run the hotspot setup
The easiest way is the wizard, in the terminal or under IP > Hotspot > Servers > Hotspot Setup in WinBox:
/ip hotspot setupIt asks for these, in order:
| Prompt | What to enter |
|---|---|
| hotspot interface | bridge-hs |
| local address of network | 10.5.50.1/24 |
| masquerade network | yes |
| address pool of network | hs-pool (10.5.50.10-10.5.50.254) |
| select certificate | none (see the HTTPS note below) |
| IP address of SMTP server | 0.0.0.0 |
| DNS servers | your upstream DNS |
| DNS name | leave empty, or a name like hotspot.example.com |
| name of local hotspot user | admin (set a password) |
The wizard creates the hotspot server, a hotspot profile, a firewall hs-unauth chain and NAT rules. A device that joins now gets an address and is redirected to the login page when it opens a website.
Step 3: Add users and speed limits
To turn a plan in Mbps into the MB/s a customer will see while downloading, use the bandwidth converter.
Create a user profile that holds the limits, then attach users to it. In the profile, rate-limit is written upload/download from the client’s point of view (rx/tx from the router’s side), so 1M/2M means 1 Mbps up and 2 Mbps down.
/ip hotspot user profile add name=plan-2M rate-limit=1M/2M shared-users=1 session-timeout=1h idle-timeout=10m
/ip hotspot user add name=guest1 password=ChangeMe123 profile=plan-2M
/ip hotspot user add name=guest2 password=ChangeMe456 profile=plan-2M limit-uptime=2h- shared-users=1 lets one device use the account at a time. Raise it if a customer has several devices.
- session-timeout forces a new login after that time.
- idle-timeout logs out inactive devices.
- limit-uptime (on the user) caps total time on that account, and limit-bytes-total caps data.
To make logins easier, set the default hotspot profile to remember devices: /ip hotspot profile set hsprof1 login-by=http-chap,cookie,mac-cookie (the wizard names the profile hsprof1). The users then do not retype their login on every visit. If you prefer one speed limit for a whole subnet instead of per-user plans, see MikroTik simple queue; for PPPoE customers see PPPoE speed limit per user.
Check, kick and block users
/ip hotspot active print
/ip hotspot active remove [find user=guest1]
/ip hotspot user disable guest1
/ip hotspot host printactive print shows who is logged in right now. Removing an active entry forces a re-login. Disabling a user stops them logging in again. For a wider view of who is on a network, see how to see who is connected to my Wi-Fi.
Common problems and fixes
- The login page does not appear. Open a plain HTTP site such as
http://neverssl.com. Confirm the device got a 10.5.50.x address and that DNS works. - Logged in but no internet. Check the WAN NAT masquerade rule and that the router itself can ping 8.8.8.8.
- Websites do not open but pings work. DNS is the usual cause. Make sure
allow-remote-requests=yesis set and the DHCP network hands out the right DNS server. - Wrong or missing speed limit. The limit is on the user profile. Check the user is on the right profile with
/ip hotspot user print. - Customers logged in on someone else’s device. Set
shared-users=1and check/ip hotspot active print. - Router slows down with many users. Large hotspots need a router with enough CPU. Disable unused wizard rules and keep per-user queues to a sensible number.
FAQ
How do I set up a hotspot on MikroTik?
Give an interface a subnet and DHCP server, run /ip hotspot setup, then add users with /ip hotspot user add. The wizard builds the server, profile and firewall rules.
How do I limit the speed of hotspot users?
Create a hotspot user profile with a rate-limit value such as 1M/2M, which is upload/download from the client’s side, and attach the users to that profile.
Why does the hotspot login page not show up?
Usually DHCP or DNS is not working for the client, or the device opened an HTTPS site first. Try a plain HTTP site and confirm the client has a hotspot-subnet address.
Can I limit hotspot users by time or data?
Yes. Use session-timeout and idle-timeout on the profile, and limit-uptime and limit-bytes-total on each user.
Sources: my own experience configuring MikroTik routers for ISP customers, and MikroTik’s published RouterOS hotspot documentation. I did not run these exact commands on a router while writing, and RouterOS 6 and 7 menus differ slightly, so test on a non-production device first.
