Italian Trulli

Step-by-step guide to configuring Mikrotik – Part 3: Setting up Wifi Marketing

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:

  1. Generate device id (NAS_ID) on admin page.
  2. Set up the Mikrotik router so that it works properly as an internet connection router. (Note that internet connection is required)
  3. Run the installation script.
  4. 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 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:
:local redirectUrl ""
/interface bridge
add name=bridge-wifibiz
/ip hotspot profile
add hotspot-address= 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=
/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= comment="hotspot network" interface=bridge-wifibiz \
/ip dhcp-server network
add address= comment="hotspot network" gateway=
/ip dns
set allow-remote-requests=yes servers=,
/ip firewall nat
add action=masquerade chain=srcnat comment="masquerade hotspot network" \
/ip hotspot walled-garden
add dst-host=*
add dst-host=*smartwifi*
add dst-port=443
add dst-port=443
add dst-port=443
add address= secret=Zi0HgArisaKoevwz service=hotspot timeout=15s
/tool fetch url="" \
    mode=https dst-path=/flash/wifibiz/login.html
/tool fetch url="" \
    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:

References: vn

Thank you for following the article, wish you successful installation!!!

Contents (Nội dung)