# Hướng dẫn cài đặt wifi marketing cho Mikrotik với WifiBiz

## Các bước cài đặt wifi marketing trên Mikrotik

1. Tạo thiết bị trên trang admin.wifibiz.net để lấy link của trang chào (có dạng: *<https://wifibiz.net/wifi/NAS\\_ID>*)
2. Tạo dịch vụ hotspot mặc định của Mikrotik
3. Tinh chỉnh tham số hotspot

#### Chi tiết cách thực hiện

#### Tạo dịch vụ hotspot

Vào menu IP >> Hotspot và bấm nút Hotspot Setup, sau đó điền các tham số thích hợp

<figure><img src="/files/HcsTt91fl1i63DulfiBn" alt=""><figcaption><p>Mikrotik hotspot setup</p></figcaption></figure>

#### Tinh chỉnh tham số Hotspot

***1. Sửa tên hotspot server***

Sau khi tạo dịch vụ hotspot mặc định của Mikrotik ta sẽ có một hotspot server như trong hình dưới đây với tên là ***hotspot1*** có profile tương ứng là ***hsprof1***

<figure><img src="/files/jgIiAg7fqD16fEGxn5DW" alt=""><figcaption><p>hotspot server</p></figcaption></figure>

Bấm đúp chuột vào dòng server để sửa tên với link trang chào.

<figure><img src="/files/im2Pvwh8TxSHUmrVARDC" alt="mikrotik hotspot server name"><figcaption><p>Tên hotspot server</p></figcaption></figure>

**2. Sửa hotspot server profile**&#x20;

Chuyển qua tab Server Profile

<figure><img src="/files/bzc91Dr47rIYehJ0eZUZ" alt=""><figcaption></figcaption></figure>

Tick chọn phương thức đăng nhập

<figure><img src="/files/uNsyWoESOdrW2qcqhA2H" alt=""><figcaption></figcaption></figure>

***3. Sửa default user profile***

Qua tab User Profiles

<figure><img src="/files/uLPtZVXlQJYGGFX6Kr3k" alt=""><figcaption><p>Sửa tham số Shared Users</p></figcaption></figure>

<figure><img src="/files/QosCBl21yWJ8NM8SLIZV" alt=""><figcaption><p>Có thể sử dụng MAC Cookie</p></figcaption></figure>

***4. Thêm các tham số cần thiết bằng cách***

Copy đoạn mã dưới đây sang notepad và thay đổi biến \<HOTSPOT\_SERVER> bằng thư mục của hotspot server đã tạo (thường thư mục sẽ là /hotspot)

Mở cửa sổ Terminal trong Winbox và copy/paste đoạn mã đã sửa trên notepad.

```bash
/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=10s
/tool fetch url="https://raw.githubusercontent.com/smartwifivn/mikrotik-hotspot/master/login.html" \
    mode=https dst-path=/<HOTSPOT_FOLDER>/login.html
/tool fetch url="https://raw.githubusercontent.com/smartwifivn/mikrotik-hotspot/master/alogin.html" \
    mode=https dst-path=/<HOTSPOT_FOLDER>/alogin.html
```

**Hoàn thành**

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](https://github.com/smartwifivn/mikrotik-hotspot/archive/master.zip), 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>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.wifibiz.net/cai-dat-thiet-bi/huong-dan-cai-dat-wifi-marketing-cho-mikrotik-voi-wifibiz.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
