Site icon Application System

Hướng dẫn cấu hình Mikrotik theo từng bước – Phần 3: Cài đặt Wifi Marketing

Các bước cài đặt Wifi Marketing trên Mikrotik

Áp dụng cho RouterOS v6.32 trở đi, các bản cũ hơn thì thư mục hotspot sẽ thay đổi. Để cài đặt thành công, các bạn cần theo các bước sau:

  1. Tạo id của thiết bị (NAS_ID) trên trang admin.wifibiz.net
  2. Cài đặt router Mikrotik sao cho nó hoạt động bình thường như một router kết nối internet. (Lưu ý phải có internet)
  3. Chạy đoạn script cài đặt.
  4. Gán port hoặc interface vào bridge mới tạo ra bởi script.

Chi tiết các bước:

Bước 1 và Bước 2:

Bước 3: Chạy đoạn script cài đặt.

#
# 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
}

Bước 4: Hoàn thành

Sau khi xong bước 3, lúc này trong Mikrotik đã tạo ra một bridge có tên bridge-wifibiz, nhiệm vụ lúc này là gán port hoặc wlan cần triển khai wifi marketing vào bridge này để sử dụng:

Tới đây thì wifi marketing đã có thể hoạt động, nếu chưa trơn chu, bạn có thể reboot lại router để thử.

Một số trường hợp trang đăng nhập không hiển thị (mà hiển thị trang đăng nhập mặc định của Mikrotik) thì bạn có thể sửa bằng cách tải file sau, giải nén và upload 2 file login.html và alogin.html vào thư mục hotspot của dịch vụ vừa tạo.

Nếu bạn gặp khó khăn vui lòng liên hệ đội ngũ support bằng cách tạo ticket từ trang web này hoặc liên hệ với thông tin đăng trên trang web: https://smartwifi.com.vn

Nguồn tham khảo: https://smartwifi.com.vn

Cảm ơn bạn đã theo dõi bài viết, chúc bạn cài đặt thành công!!!

Exit mobile version