Steps to install Wifi Marketing on Mikrotik
Applicable to RouterOS v6.32 and later, the hotspot directory will change for older versions. To install successfully, you need to follow these steps:
- Generate device id (NAS_ID) on admin page. wifibiz.net
- Set up the Mikrotik router so that it works properly as an internet connection router. (Note that internet connection is required)
- Run the installation script.
- Assign the port or interface to the new bridge created by the script.
Detailed steps:
Step 1 and Step 2:
- You do it normally, no problem.
- Note that the following code will use the IP range 10.5.50.0/24 so if your router is using the range This IP, please change to another IP range for the following code to run well.
Step 3: Run the installation script.
- Copy the following code to your window’s notepad or any other text editor you have:
#
# Best Wifi-Marketing provider: http://smartwifi.com.vn
#
{
:local redirectUrl "https://wifibiz.net/wifi/NAS_ID"
/interface bridge
add name=bridge-wifibiz
/ip hotspot profile
add hotspot-address=10.5.50.1 html-directory=/flash/wifibiz login-by=\
http-chap,http-pap name=wifibiz radius-accounting=no use-radius=yes
/ip hotspot user profile
set [ find default=yes ] shared-users=1000
/ip pool
add name=wifibiz-pool ranges=10.5.50.2-10.5.50.254
/ip dhcp-server
add address-pool=wifibiz-pool disabled=no interface=bridge-wifibiz lease-time=\
1h name=dhcp-wifibiz
/ip hotspot
add address-pool=wifibiz-pool disabled=no interface=bridge-wifibiz name=\
$redirectUrl profile=wifibiz
/ip address
add address=10.5.50.1/24 comment="hotspot network" interface=bridge-wifibiz \
network=10.5.50.0
/ip dhcp-server network
add address=10.5.50.0/24 comment="hotspot network" gateway=10.5.50.1
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
/ip firewall nat
add action=masquerade chain=srcnat comment="masquerade hotspot network" \
src-address=10.5.50.0/24
/ip hotspot walled-garden
add dst-host=wifibiz.net
add dst-host=api.wifibiz.net
add dst-host=static.wifibiz.net
add dst-host=analytics.smartwifi.vn
add dst-host=*.wifibiz.net
add dst-host=*smartwifi*
add dst-host=use.fontawesome.com dst-port=443
add dst-host=maxcdn.bootstrapcdn.com dst-port=443
add dst-host=fonts.googleapis.com dst-port=443
/radius
add address=178.128.51.224 secret=Zi0HgArisaKoevwz service=hotspot timeout=15s
/tool fetch url="https://raw.githubusercontent.com/smartwifivn/mikrotik-hotspot/master/login.html" \
mode=https dst-path=/flash/wifibiz/login.html
/tool fetch url="https://raw.githubusercontent.com/smartwifivn/mikrotik-hotspot/master/alogin.html" \
mode=https dst-path=/flash/wifibiz/alogin.html
}
- Replace “NAS_ID” with the NAS_ID you generated in admin.wifibiz .net
- Select all the edited code and press copy (Ctrl-C in windows)
- Open winbox, connect to Mikrotik, click New Terminal menu to Opens a console window.
- Right click on the Terminal window and select Paste
- Press enter to finish running the code.
Step 4: Done
After completing step 3, now in Mikrotik has created a bridge named bridge-wifibiz, the task is to assign the port or wlan that needs to deploy wifi marketing to this bridge to use:
- From the winbox interface, click the menu Bridge
- On the Bridge tab you can check the existence of bridge-wifibiz
- Switch to tab Ports
- At tab < em>Ports you can see the list of assigned ports (eg default bridge assignment). Double click on a port to use and change the Bridge section to bridge-wifibiz, that port will be a wifi marketing service, now just assign the Access Point to the port there and broadcast your wifi marketing.
- At the Ports tab, if the interface/port you want to use does not appear, press the + button to add a new one.
At this point, wifi marketing can work, if it’s not smooth, you can reboot the router to try.
Some cases where the login page is not displayed (but shows Mikrotik’s default login page), you can fix it by downloading the following file, extract and upload 2 files login.html and alogin.html to the hotspot folder of the newly created service.
If you have difficulty, please contact support by creating a ticket from this website or contact the information posted on the website: https://smartwifi.com.vn
References: https://smartwifi.com. vn
Thank you for following the article, wish you successful installation!!!