Running two hotspots on a Mikrotik router

The following guide is intended for advanced operators, understanding Mikrotik routers is required or you may break your current/working configuration!
Also please note that all usage will be accounted for your first location – even those ones which happened/actioned on the second one.

This guide provided as is, we don’t provide support for it.

So you would like to have two hotspots on the same Mikrotik router? You can do that, but it requires a bit of a tinkering – here’s how you can set it up:

  1. Create your first location and set it up following our Mikrotik Gateway Install Guide and verify if it works.
  2. Create your second location and change the Internal Login and Logout URL’s to and respectively
  3. Copy the hotspot folder from the Mikrotik to your computer. Edit the login.html and alogin.html files: change the value=”$(identity)” to value=OPERATORUSERNAME_LOCATIONIDNUMBER of the second location. Save, then rename the hotspot folder on your computer to hotspot2, and copy the whole hotspot2 folder to the root of your Mikrotik or to the /flash/ folder if it’s present in your device.
  4. Copy the following commands to a simple text editor and change the parameters to yours – in the first row depending on if you don’t have a flash folder on your Mikrotik you need to delete that and in the last row the OPERATORUSERNAME_LOCATIONIDNUMBER must be the set for the second location:
/ip hotspot profile add hotspot-address= name=hsprof2 html-directory=/flash/hotspot2
/ip pool add name=hs-pool-4 ranges=
/interface vlan add name=vlan-10 vlan-id=10 interface=HS_bridge disabled=no
/ip dhcp-server add address-pool=hs-pool-4 disabled=no interface=vlan-10 lease-time=1h name=dhcp2
/ip hotspot add address-pool=hs-pool-4 disabled=no interface=vlan-10 name=hotspot2 profile=hsprof2
/ip address add address= comment="HotspotSystem network 2" interface=vlan-10 network=
/ip dhcp-server network add address= comment="hotspot network 2" gateway=
/ip firewall nat add action=masquerade chain=srcnat comment="masquerade hotspot network 2" src-address=
/ip hotspot profile set hsprof2 use-radius=yes
/ip hotspot profile set hsprof2 login-by=http-pap,http-chap,https
/system scheduler add interval=1h name=up2 on-event="/tool fetch keep-result=no mode=http src-path=(\"up.php\\\?mac=\".[/interface ethernet get 0 mac-address].\"&nasid=\"OPERATORUSERNAME_LOCATIONIDNUMBER"&os_date=Mikrotik&uptime=\".[/system clock get time].\"%20up%20\".[/system resource get uptime].\",%20load%20average:%20\".[/system resource get cpu-load].\"%\")" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive start-date=jan/01/1970 start-time=01:00:00

And that’s it! If you check VLAN 10, you will see your second hotspot network, if you switch to your untagged network, it will be the first one.

2 4

Leave A Comment?