Winbox
Compatibility
Social WiFi has been tested and is proven to work on the following configurations:
RouterOS versions:
- 6.x
- 7.5 and newer, tested up to 7.15.3 (hotspot doesn’t work on RouterOS 7.x below version 7.5)
Connecting the device to the Internet
The router with factory settings should be connected to the Internet on first ethernet port (PoE in). The procedure of restoring factory settings can be found here.
The router needs to be connected to Internet source and, depending on the model, turned on with a proper switch.
Accessing the device’s administration panel
The PC should be connected to the second ethernet port of the device you are configuring. It should be receiving from it an IP address from the 192.168.88.2-192.168.88.254 pool.
After launching the program you will need to find the router on the list and log in using the login admin
and leaving the password field empty.
If after logging in a window containing default configuration appears, press ENTER and close the window of the terminal
Device configuration
Interfaces → + → Bridge
Name | sw |
---|---|
OK |
IP → Addresses → +
Address | 10.8.0.1/16 |
---|---|
Network | 10.8.0.0 |
Interface | sw |
OK |
IP → Pool → +
Name | dhcp_pool_sw |
---|---|
Addresses | 10.8.0.2-10.8.255.254 |
OK |
IP → DHCP Server → +
Name | dhcp_sw |
---|---|
Interface | sw |
Lease Time | 3d 00:00:00 |
Address Pool | dhcp_pool_sw |
OK |
IP → DHCP Server → Networks → +
Address | 10.8.0.0/16 |
---|---|
Gateway | 10.8.0.1 |
OK |
Bridge → Ports → +
Interface | wlan1 |
---|---|
Bridge | sw |
OK |
Configuring RADIUS
In order for Social WiFi to work you need to upload the files to your MikroTik device. To do that, please open the New Terminal window:
Copy and paste the following script to the terminal:
{ :local downloadEndpoint "https://login.socialwifi.com/installation/mikrotik/download"; :local fileNames {"login.html"; "rlogin.html"; "alogin.html"; "flogin.html"; "md5.js"} :local destinationDirectory ""; :if ([:len [/file find name="flash" type="disk"]] > 0) do={ :set destinationDirectory "/flash/"; } :local ether1Mac ([/interface get [find name="ether1"]]->"mac-address"); :foreach fileName in=$fileNames do={ :put "Downloading file: $downloadEndpoint/$fileName\?mac=$ether1Mac" /tool fetch url="$downloadEndpoint/$fileName\?mac=$ether1Mac" dst-path="$destinationDirectory$fileName" }}
After running the script files have downloaded automatically.
Now, from the menu on the left select RADIUS → +.
Service | hotspot |
---|---|
Address | 35.205.62.147 |
Secret | Paste the content copied from Radius Secret in Social WiFi dashboard as described in the previous step |
Authentication Port | 31812 |
Accounting Port | 31813 |
Timeout | 1000 |
Accounting Backup | Unchecked |
Require Message Auth | yes for request resp (This field is only in RouterOS versions above 7.13. If you’re using a lower version, you won’t see it.) |
OK |
Configuring Walled Garden DNS
New Terminal → paste the below commands into the terminal (all commands can be copied and pasted at once)
Copy all of the below section
## Social WiFi
/ip hotspot walled-gardenadd comment="socialwifi: Allow captive portal main service." dst-host=*.socialwifi.comadd comment="socialwifi: Allow captive portal main service." dst-host=sw-login.com
## YouTube widget
/ip hotspot walled-gardenadd comment="socialwifi: Allow YouTube widget." dst-host=*.youtube.comadd comment="socialwifi: Allow YouTube widget. It's a workaround for Mikrotik walled garden bug with CNAME in DNS response. Required to allow www.youtube.com." dst-host=youtube-ui.l.google.comadd comment="socialwifi: Allow YouTube widget. It's a workaround for Mikrotik walled garden bug with CNAME in DNS response. Required to allow img.youtube.com." dst-host=ytimg.l.google.comadd comment="socialwifi: Allow YouTube widget." dst-host=*.ytimg.comadd comment="socialwifi: Allow YouTube widget." dst-host=*.googlevideo.comadd comment="socialwifi: Allow YouTube widget." dst-host=yt3.ggpht.comadd comment="socialwifi: Allow YouTube widget. It's a workaround for Mikrotik walled garden bug with CNAME in DNS response. Required to allow yt3.ggpht.com." dst-host=*.l.googleusercontent.com
## Facebook remarketing pixel
/ip hotspot walled-gardenadd comment="socialwifi: Allow Facebook remarketing pixel." dst-host=*.facebook.comadd comment="socialwifi: Allow Facebook remarketing pixel." dst-host=connect.facebook.netadd comment="socialwifi: Allow Facebook remarketing pixel. It's a workaround for Mikrotik walled garden bug with CNAME in DNS response. Required to allow connect.facebook.net." dst-host=*.fbcdn.net
## Google remarketing tag
/ip hotspot walled-gardenadd comment="socialwifi: Allow Google remarketing tag." dst-host=www.googletagmanager.comadd comment="socialwifi: Allow Google remarketing tag. It's a workaround for Mikrotik walled garden bug with CNAME in DNS response. Required to allow www.googletagmanager.com." dst-host=www-googletagmanager.l.google.comadd comment="socialwifi: Allow Google remarketing tag." dst-host=www.googleadservices.comadd comment="socialwifi: Allow Google remarketing tag. It's a workaround for Mikrotik walled garden bug with CNAME in DNS response. Required to allow www.googleadservices.com." dst-host=pagead*.l.doubleclick.netadd comment="socialwifi: Allow Google remarketing tag." dst-host=www.google.*
## Facebook
/ip hotspot walled-gardenadd comment="socialwifi: Allow login with Facebook." dst-host=facebook.comadd comment="socialwifi: Allow login with Facebook." dst-host=*.facebook.comadd comment="socialwifi: Allow login with Facebook." dst-host=*.fbcdn.net
## LinkedIn
/ip hotspot walled-gardenadd comment="socialwifi: Allow login with LinkedIn." dst-host=linkedin.comadd comment="socialwifi: Allow login with LinkedIn." dst-host=*.linkedin.comadd comment="socialwifi: Allow login with LinkedIn. It's a workaround for Mikrotik walled garden bug with CNAME in DNS response. Required to allow www.linkedin.com." dst-host=*.l-msedge.netadd comment="socialwifi: Allow login with LinkedIn. It's a workaround for Mikrotik walled garden bug with CNAME in DNS response. Required to allow www.linkedin.com." dst-host=*.dc-msedge.netadd comment="socialwifi: Allow login with LinkedIn." dst-host=*.licdn.comadd comment="socialwifi: Allow login with LinkedIn. It's a workaround for Mikrotik walled garden bug with CNAME in DNS response. Required to allow static-exp1.licdn.com." dst-host=*.epsiloncdn.netadd comment="socialwifi: Allow login with LinkedIn. It's a workaround for Mikrotik walled garden bug with CNAME in DNS response. Required to allow static-exp1.licdn.com." dst-host=*.akamai.netadd comment="socialwifi: Allow login with LinkedIn. It's a workaround for Mikrotik walled garden bug with CNAME in DNS response. Required to allow www.linkedin.com." dst-host=www.linkedin.com.cdn.cloudflare.net
## Twitter
/ip hotspot walled-gardenadd comment="socialwifi: Allow login with Twitter." dst-host=x.comadd comment="socialwifi: Allow login with Twitter." dst-host=api.x.comadd comment="socialwifi: Allow login with Twitter. It's a workaround for Mikrotik walled garden bug with CNAME in DNS response. Required to allow api.x.com." dst-host=tpop-api.x.comadd comment="socialwifi: Allow login with Twitter." dst-host=twitter.comadd comment="socialwifi: Allow login with Twitter." dst-host=api.twitter.comadd comment="socialwifi: Allow login with Twitter. It's a workaround for Mikrotik walled garden bug with CNAME in DNS response. Required to allow api.twitter.com." dst-host=*.twitter.comadd comment="socialwifi: Allow login with Twitter." dst-host=*.twimg.comadd comment="socialwifi: Allow login with Twitter. It's a workaround for Mikrotik walled garden bug with CNAME in DNS response. Required to allow pbs.twimg.com." dst-host=pbs.twimg.com.cdn.cloudflare.netadd comment="socialwifi: Allow login with Twitter. It's a workaround for Mikrotik walled garden bug with CNAME in DNS response. Required to allow abs.twimg.com." dst-host=twimg.twitter.map.fastly.net
/
Configuring Captive Portal / Hotspot
IP → Hotspot → Server Profiles → default (click twice to access settings)
(in General tab) DNS Name | logging.sw.com |
---|---|
(in General tab) HTML Directory | change name to . (period) (If your Files section contains a “flash” folder, make sure this field says “flash/.” without question marks) |
(in Login tab) Login By: HTTP PAP (uncheck everything else)
(in RADIUS tab) Use RADIUS: yes
Click OK
IP → Hotspot → Servers → +
Name | socialwifi |
---|---|
Interface | sw |
Address Pool | none |
Idle Timeout | 00:05:00 |
Addresses Per MAC | (remove value and leave empty) |
OK |
Now, go to User Profiles tab and double click on default to edit. Set Keepalive Timeout to 3d 00:00:00.
Adding the MikroTik MAC address to the Social WiFi Dashboard.
The MAC address can be found in Interfaces -> ether1 (double click) -> MAC Address.
Copy the value from the “MAC Address” field and paste it in the Social WiFi panel. To do so, log in to your account in the Social WiFi Dashboard. In the “Access Points” tab, press “Add” (upper right corner), paste the MAC address you copied into the form (adding a name is optional) and click “Create”.