Mikrotik - Multiple Hotspots on a Single Device

This manual describes the configuration of multiple hotspots. The following setup presumes correctly configured RADIUS servers and Walled Garden from the previous hotspot setup.

1.1 Create a new Bridge Interface 

Bridge / Bridge / Add / New Interface

Namebridge-HS2 (create a unique name)
ARPenabled

1.2 Add desired ports to the bridge

Bridge / Ports / Add / New Bridge Port

Interfaceselect desired interface (ether or VLAN)
Bridgeselect the new bridge

2. Definition of the additional SOCIFI hotspot

2.1 Run the definition of hotspot
IP / Hotspot / Servers / Hotspot Setup

  1. HotSpot Interface: bridge-HS2
  2. Local Address of Network: check if the suggested address is unique within all defined hotspots
  3. Address Pool of Network: check if the suggested pool is unique within all defined hotspots
  4. Select Certificate: none
  5. IP Address of SMTP Server: 0.0.0.0
  6. DNS Servers: Local Address of Network / 8.8.8.8 / 8.8.4.4
    First DNS server address must be the interface address!!
  7. DNS Name: hotspot2.socifi.com (required - create a unique name within the defined hotspots)
    This domain could be adjusted to fit your needs. For example hotspot2.mydomain.com
  8. Name of Local HotSpot User: user

Illustrational image - values are not correct


3. Change Hotspot settings

3.1 Remove Shared User:
IP / Hotspot
  / User Profiles / Default  General 

Shared Usersclear


3.2 Change hotspot name
IP / Hotspot / Server / hotspot1 (the new created hotspot)

Name

MK_ <serial number of Mikrotik><number of the hotspot>, for example "MK_3F0602DFA1442,

where "3F0602DFA144" is serial number of Mikrotik and "2" is number of the hotspot

Addresses per MAC1


3.3 Change the Hotspot Server Profile
IP / Hotspot / Server Profiles / select hsprof2 (new created profile - see Profile field on the Hotspot Server window )

3.3.1 General Tab

HTML Directory

change the HTML directory name to the unique one (eg hotspot2)

the value of this field is important for the Change Login Script 



3.3.2 Login Tab

HTTP PAPchecked

3.3.3 RADIUS Tab

Use RADIUSchecked
Default Domain
Location ID
Location Name
Mac FormatXX:XX:XX:XX:XX:XX
Accountingchecked
Interim-Update00:01:00
Nas Port Type19 (wireless-802.11)

4. Creating a definition for hotspot login

Script definition for content of hotspot / login.html

We generate a hotspot / login.html file the same way: System / Scripts / +
Name: ReplaceLogin2


Click Apply and than run script: Run Script (change takes the effect by changing the date and time of file: File hotspot2/login.html). Modify and copy & paste following script:

If you are customer with White Label solution, please change http://connect.socifi.com to your custom domain (for example http://connect.mycustomdomain.com)

Some RouterOS devices have default storage on the flash memory. In this case, it is necessary to modify part of this script “/file” in according to its actual storage name, e.g.: "/file set flash/hotspot2/login.html contents=" supposing that link "flash/hotspot2/login.html" exists. It is necessary to check it in the list of files in the "File" module. 

Check if the HTML Directory (/hotspot2/) of the hotspot is set correctly according to the Hotspot Server Profile setting. See chapter 3.3.1 of this manual.

Important!

Modify the script. Change the value  ABCDEFGHIJKLX in the script to <serial number of Mikrotik><number of the hotspot>, for example "3F0602DFA1442", where "3F0602DFA144" is serial number of your Mikrotik device and "2" is number of the hotspot. See chapter 3.2 of this manual. 

Important!

Use this modified serial number also for registering of the hotspot in the SOCIFI Dashboard.

/file set "hotspot2/login.html" contents="<html>
<head>
<meta http-equiv=\"refresh\" content=\"0; url=http://connect.socifi.com/?rad=yes&serial=ABCDEFGHIJKLX&client_mac=\$(mac)&client_ip=\$(ip)&userurl=\$(link-orig)&login_url=\$(link-login-only)\" />
<meta http-equiv=\"pragma\" content=\"no-cache\">
<meta http-equiv=\"expires\" content=\"-1\">
</head>
</html>"


5. Add the new hotspot to the SOCIFI Dashboard

Use the modified serial number from the script for registration.


Step 1: Login to SOCIFI Dashboard

Step 2: Click on the "Hotspots" tab on the left sidebar

Step 3: Click on the “Add a new hotspot” button located on the top right corner on the screen (pictured below)

Note: A pop-up window will appear (below)

Step 4: Select the Wi-Fi hardware manufacturer from the drop down menu

Step 5: Enter the serial number or MAC address (depending on the specific equipment manual) of your equipment. You can add multiple hotspots at once.

Step 6: Set your Network location (this step is essential for correct ad targeting)

Step 7: In the pop-up window type your location or just move the marker on the map and click on the save button to confirm the selection. This address is used for ad GEO targeting.

Step 7: Click Save

Note: Newly added hotspot are marked as  (Hotspot pending). After the first user connects to the hotspot via SOCIFI, the status will automatically change and appear as  (Active) within an hour. Get your first connections to test if it works properly.