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:
- Create your first location and set it up following our Mikrotik Gateway Install Guide and verify if it works.
- Create your second location and change the Internal Login and Logout URL’s to http://10.5.64.1/login and http://10.5.64.1/logout respectively
- 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.
- 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=10.5.64.1 name=hsprof2 html-directory=/flash/hotspot2 /ip pool add name=hs-pool-4 ranges=10.5.64.2-10.5.79.254 /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=10.5.64.1/20 comment="HotspotSystem network 2" interface=vlan-10 network=10.5.64.0 /ip dhcp-server network add address=10.5.64.0/20 comment="hotspot network 2" gateway=10.5.64.1 /ip firewall nat add action=masquerade chain=srcnat comment="masquerade hotspot network 2" src-address=10.5.64.0/20 /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 address=tech.hotspotsystem.com host=tech.hotspotsystem.com 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.