Mikrotik RouterOS on an x86 machine (virtual)
1. Getting started with WinBox
Confirm the action by pressing Connect button.
2. Setting SNTP client
After the next reboot: System, Reboot configure SNTP client (time):
System > SNTP Client
Please set servers that are as close to your location as possible. You can find NTP list here: http://www.pool.ntp.org/en/
The time is automatically synchronized after the correct termination of LAN configuration.
3. Setting up DHCP client
4. Adding the bridge
5. Adding the bridge ports
6. Definition of the SOCIFI hotspot
Run the definition of hotspot:
IP > Hotspot > Servers Tab, Hotspot Setup
- HotSpot Interface: bridge-HS
- Local Address of Network: 192.168.88.1/24
- Address Pool of Network: 192.168.88.20 - 192.168.88.219
- Select Certificate: none
- IP Address of SMTP Server: 0.0.0.0
- DNS Servers: 192.168.88.1 / 8.8.8.8 / 8.8.4.4
First DNS server address must be the interface address!! - DNS Name: hotspot.socifi.com (required)
- Name of Local HotSpot User: user
7. Removing shared user
Now define a list of allowed servers, IP > Hotspot Walled Garden:
Create a script WalledGarden script: System > Scripts +
Name: WalledGarden
Copy & paste following script:
If you are customer with White Label solution, please add your custom domain (for example mycustomdomain.com) to the Walled Garden list.
add dst-host=*. mycustomdomain.com
/ip hotspot walled-garden add dst-host=*.socifi.com add dst-host=*.facebook.com add dst-host=*.akamaihd.net add dst-host=*.akamai.net add dst-host=*.edgecastcdn.net add dst-host=*.edgekey.net add dst-host=*.akamaiedge.net add dst-host=*.twitter.com add dst-host=twitter.com add dst-host=*.twimg.com add dst-host=*.fastly.net add dst-host=*.li-cdn.net add dst-host=*.cloudfront.net add dst-host=facebook.com add dst-host=*.fbcdn.net add dst-host=*.instagram.com add dst-host=instagram.com add dst-host=*.cdninstagram.com add dst-host=*.linkedin.com add dst-host=linkedin.com add dst-host=*.licdn.com
facebook.com and twitter.com (Yes, twice. Once with and once without the asterisk)
The result is a list of servers:
The list of Walled Garden servers is changed from time to time, you may be asked to change its contents. The current list is always in this documentation. Before you run the script again (even if with new content), first you must delete old Walled Garden server list (otherwise the list would be permanently duplicated).
8. 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: ReplaceLogin
:local mac [system routerboard get serial-number]; :if ( [system routerboard get routerboard] = yes ) do {:set mac [system routerboard get serial-number]} else { :set mac [interface ethernet get ether1 mac-address]}; /file set "hotspot/login.html" contents="<html> <head> <meta http-equiv=\"refresh\" content=\"0; url=http://connect.socifi.com/?rad=yes&serial=$mac&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>"
9. Changing the default password
10. Configuring the RADIUS server
We recommend to use this set of RADIUS servers:
We recommend to use this set of RADIUS servers:
11. Safety in the end, but not the last
New Firewall Rule> Action tab
Action: drop
New rule must be at the last line:
12. Connecting your MikroTik to SOCIFI Dashboard
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.