White label hardware configuration guide
To enable users to log in using the white label domain instead of socialwifi.com
, several changes in the network configuration are necessary. The primary changes involve setting the appropriate “redirect URL” and configuring the “Walled Garden” (or its equivalent, depending on the vendor).
General Changes
Redirect URL
The URL for redirection to the captive portal login screen must be changed to point to the white label domain.
Walled Garden
Update the “walled garden” (or equivalent feature) configuration to include the white label domain. There are two entries that need to change:
Depending on the hardware vendor, the first entry above might look differently and require changing in one of the following formats:
or:
Vendor specific changes
This section will describe the changes needed for most commonly used network vendors. It will also include detailed examples. It is assumed that the default configuration for Social WiFi has been already done.
UniFi
Go to the Hotspot Settings -> Landing Page -> Settings. Under the Domain Checkbox, change the “Domain” field:
Next, under the Authorization Access section, edit the first two Pre-Authorization Allowances domains:
MikroTik
First, run this script to download files for the white label domain. Make sure to change the first line in the script from “https://login.your-wifi-brand.com/(…)” to the white label domain.
{ :local downloadEndpoint "https://login.your-wifi-brand.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" }}
Next, change the Walled Garden entries. Run the script below to remove all the current entries and add the new ones.
/ip hotspot walled-gardenremove [find dynamic=no]
/ip hotspot walled-gardenadd comment="Allow captive portal main service." dst-host=*.your-wifi-brand.comadd comment="Allow captive portal main service." dst-host=login.hotspot-login.comadd comment="Allow YouTube widget." dst-host=*.youtube.comadd comment="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="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="Allow YouTube widget." dst-host=*.ytimg.comadd comment="Allow YouTube widget." dst-host=*.googlevideo.comadd comment="Allow YouTube widget." dst-host=yt3.ggpht.comadd comment="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.comadd comment="Allow Facebook remarketing pixel." dst-host=*.facebook.comadd comment="Allow Facebook remarketing pixel." dst-host=connect.facebook.netadd comment="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.netadd comment="Allow Google remarketing tag." dst-host=www.googletagmanager.comadd comment="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="Allow Google remarketing tag." dst-host=www.googleadservices.comadd comment="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="Allow Google remarketing tag." dst-host=www.google.*add comment="Allow login with Facebook." dst-host=facebook.comadd comment="Allow login with Facebook." dst-host=*.facebook.comadd comment="Allow login with Facebook." dst-host=*.fbcdn.netadd comment="Allow login with Google." dst-host=accounts.google.*add comment="Allow login with Google. It's a workaround for Mikrotik walled garden bug with CNAME in DNS response. Required to allow accounts.google.co.uk and other regional versions." dst-host=accounts-cctld.l.google.comadd comment="Allow login with Google." dst-host=ssl.gstatic.comadd comment="Allow login with Google." dst-host=fonts.gstatic.comadd comment="Allow login with Google. It's a workaround for Mikrotik walled garden bug with CNAME in DNS response. Required to allow fonts.gstatic.com." dst-host=gstaticadssl.l.google.comadd comment="Allow login with Google." dst-host=fonts.google.comadd comment="Allow login with Google." dst-host=accounts.youtube.comadd comment="Allow login with Google. It's a workaround for Mikrotik walled garden bug with CNAME in DNS response. Required to allow accounts.youtube.com." dst-host=www3.l.google.comadd comment="Allow login with Google." dst-host=content.googleapis.comadd comment="Allow login with Google." dst-host=apis.google.comadd comment="Allow login with Google. It's a workaround for Mikrotik walled garden bug with CNAME in DNS response. Required to allow apis.google.com." dst-host=plus.l.google.comadd comment="Allow login with Google." dst-host=play.google.comadd comment="Allow login with Google." dst-host=www.google.comadd comment="Allow login with LinkedIn." dst-host=linkedin.comadd comment="Allow login with LinkedIn." dst-host=*.linkedin.comadd comment="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="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="Allow login with LinkedIn." dst-host=*.licdn.comadd comment="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="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="Allow login with Twitter." dst-host=twitter.comadd comment="Allow login with Twitter." dst-host=api.twitter.comadd comment="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="Allow login with Twitter." dst-host=*.twimg.comadd comment="Allow login with Twitter. It's a workaround for Mikrotik walled garden bug with CNAME in DNS response. Required to allow abs.twimg.com, pbs.twimg.com." dst-host=*.edgecastcdn.netadd comment="Allow login with Twitter. It's a workaround for Mikrotik walled garden bug with CNAME in DNS response. Required to allow abs.twimg.com, pbs.twimg.com." dst-host=*.akahost.net
/ip hotspot walled-garden ipadd action=accept disabled=no dst-address=35.190.70.141 !dst-address-list !dst-port !protocol !src-address !src-address-list
/
After completing all these steps, the login process will take place in the white label domain instead of “socialwifi.com”.