RB941 hAP LITE - PANDUAN LENGKAP DARI NOL SAMPAI PRODUCTION
Membangun sistem hotspot voucher lengkap: setup gateway, captive portal, user manager, walled garden,
custom login page, bandwidth management, dan monitoring.
MikroTik hAP lite cocok untuk hotspot skala kecil: cafe, warung, kos-kosan, atau RT/RW Net awal.
Kapasitas ideal 10-20 user concurrent dengan bandwidth total ~30-50Mbps.
CPU
AR9344 - 650MHz
RAM
32 MB DDR2
STORAGE
16 MB FLASH
ETHERNET
4x 10/100 Mbps
WIRELESS
2.4GHz b/g/n
POWER
5V DC / USB
OS DEFAULT
RouterOS v6 L4
HOTSPOT
~20 USER
DIMENSI
113 x 89 x 28mm
BERAT
160 gram
OPERASI
-20 ~ 70 C
HARGA
~350-450K
LIMITASI HOTSPOT: RB941 dengan RAM 32MB bisa handle ~20-30 user hotspot concurrent. Untuk >50 user, pertimbangkan hAP ac^2 (RAM 128MB) atau hAP ax^2 (RAM 1GB).
TOPOLOGI HOTSPOT
SCHEMA
// SKEMA JARINGAN HOTSPOT //[ INTERNET / ISP ]
|
| kabel UTP
v
+-------------------+
| MikroTik RB941 |
| HOTSPOT SERVER |
| |
| ether1 = WAN | (DHCP Client / PPPoE)
| |
| ether2 = LAN | \
| ether3 = LAN | +--> bridge1 (192.168.10.1)
| ether4 = LAN | /
| wlan1 = WIFI | ----> SSID: WARUNG-WIFI
| |
| HOTSPOT = ON | captive portal aktif
| NAT = masquerade |
| DHCP = ON | pool: 192.168.10.100-200
| DNS = forward |
| QUEUE = per-user | limit 2M/5M per voucher
+-------------------+
|
| subnet 192.168.10.0/24
v
[ HP / LAPTOP TAMU ]-- connect wifi -> login -> internet
ALUR HOTSPOT: (1) Tamu connect ke WiFi, (2) Buka browser -> redirect ke login page, (3) Masukkan voucher, (4) Dapat akses internet sesuai limit voucher, (5) Logout/expired -> akses dicabut.
ALUR HOTSPOT - VISUALISASI
LIVE FLOW
Visualisasi alur captive portal hotspot. Tamu connect WiFi, diblokir oleh hotspot, diarahkan ke login page,
setelah login voucher valid -> dapat akses internet. Paket amber = belum login (blocked),
hijau = sudah login (allowed),
merah = voucher expired (drop).
Belum Login (Blocked)
Voucher Aktif (Allowed)
Expired (Dropped)
Request to Internet
Response from Internet
MEKANISME: Hotspot bekerja dengan intercept semua HTTP traffic (dst-nat port 80 ke hotspot). Client yang belum login di-redirect ke login page. Setelah autentikasi sukses, IP client di-whitelist di firewall dan dapat akses internet sesuai limit queue.
RESET & AKSES AWAL
STEP 01
Langkah pertama: pastikan router dalam kondisi bersih dan bisa diakses. Hubungkan PC ke ether2/3/4
dengan kabel UTP, lalu akses via WinBox.
RESET KE FACTORY DEFAULT
RESET
# CARA 1: Tombol fisik# 1. Cabut power router# 2. Tekan tombol RESET dengan pin# 3. Colok power sambil tetap tekan RESET# 4. Tunggu LED berkedip (~5 detik), lepas# 5. Router reboot dengan config default# CARA 2: Via terminal[admin@MikroTik] > /system reset-configurationDo you really want to reset configuration? [y/N]y# CARA 3: Reset tanpa default config (kosong total)[admin@MikroTik] > /system reset-configuration no-defaults=yes skip-backup=yes! WARNING: semua konfigurasi akan terhapus
AKSES ROUTER
METODE
ALAT
ALAMAT
WinBox
Aplikasi Windows
MAC Address / 192.168.88.1
WebFig
Browser
http://192.168.88.1
SSH
Terminal / PuTTY
ssh admin@192.168.88.1
MAC Telnet
WinBox / MAC Winbox
MAC Address
NEIGHBORS
# di WinBox, klik tab "Neighbors"MAC ADDRESS IDENTITY IP VERSIOND4:01:C3:XX:XX:XX MikroTik 192.168.88.1 6.48.6# klik dua kali -> Connect via MAC (paling aman)# login: admin | password: (kosong)
IDENTITY & USER MANAGEMENT
STEP 02
Beri nama router dan ganti password admin. WAJIB sebelum router terhubung internet.
SET IDENTITY
IDENTITY
[admin@MikroTik] > /system identity set name="HOTSPOT-WARUNG"[admin@HOTSPOT-WARUNG] > # prompt berubah otomatis
GANTI PASSWORD & BUAT USER
USER
# ganti password admin[admin@HOTSPOT-WARUNG] > /user set admin password="Admin@Warung2024!"# buat user operator (read-only untuk kasir)[admin@HOTSPOT-WARUNG] > /user add name="kasir" password="kasir@2024" group="read"# buat user teknisi (write)[admin@HOTSPOT-WARUNG] > /user add name="teknisi" password="teknisi@2024" group="write"# list user[admin@HOTSPOT-WARUNG] > /user print # NAME GROUP ADDRESS 0 admin full 1 kasir read 2 teknisi write
INTERFACE & BRIDGE
STEP 03
Setup interface: ether1 untuk WAN, ether2-4 dan wlan1 digabung dalam bridge untuk LAN/hotspot.
CEK INTERFACE
INTERFACE
[admin@HOTSPOT-WARUNG] > /interface print # NAME TYPE ACTUAL-MTU 0 R1 ether1 ether 1500 1 R2 ether2 ether 1500 2 R3 ether3 ether 1500 3 R4 ether4 ether 1500 4 R wlan1 wlan 1500 5 R bridge1 bridge 1500
Setup IP gateway untuk hotspot. Ganti dari default 192.168.88.1 ke skema yang lebih rapi.
GANTI IP GATEWAY
IP ADDRESS
# cek IP yang ada[admin@HOTSPOT-WARUNG] > /ip address print # ADDRESS NETWORK INTERFACE 0 192.168.88.1/24 192.168.88.0 bridge# ganti IP gateway (misal ke 192.168.10.1)[admin@HOTSPOT-WARUNG] > /ip address set [find interface=bridge] address="192.168.10.1/24"# setelah ini, akses router via 192.168.10.1# PC perlu renew DHCP atau set IP manual 192.168.10.x# skema IP hotspot yang disarankan:# Gateway : 192.168.10.1/24# DHCP Pool : 192.168.10.100 - 192.168.10.200# Reserved : 192.168.10.2 - 192.168.10.50 (untuk static)
DHCP CLIENT (WAN)
STEP 05
Setup DHCP client di WAN (ether1) agar router dapat IP otomatis dari ISP/modem.
CATATAN: Saat hotspot di-setup, RouterOS otomatis menambahkan rule hs-auth, hs-unauth, dan hs-default di chain forward. Jangan dihapus atau diubah urutannya.
WIRELESS (WIFI)
STEP 10
Setup WiFi untuk hotspot. Untuk hotspot publik, biasanya pakai open system (tanpa password WiFi) karena autentikasi dilakukan di login page.
SETUP WIRELESS
WIRELESS
# 1. set mode AP, SSID, country[admin@HOTSPOT-WARUNG] > /interface wireless set wlan1 mode=ap-bridge ssid="WARUNG-WIFI" country=indonesia frequency-mode=regulatory-domain installation=indoor# 2. set channel[admin@HOTSPOT-WARUNG] > /interface wireless set wlan1 channel=6 band=2ghz-b/g/n# 3. OPEN SYSTEM (tanpa password WiFi)# karena autentikasi via hotspot login page[admin@HOTSPOT-WARUNG] > /interface wireless security-profiles set [find default=yes] mode=none authentication-types=""# 4. set tx-power[admin@HOTSPOT-WARUNG] > /interface wireless set wlan1 tx-power-mode=all-rates-fixed tx-power=17# 5. verifikasi[admin@HOTSPOT-WARUNG] > /interface wireless print
OPSI: WPA2 + HOTSPOT
Jika ingin WiFi tetap pakai password + hotspot (double auth), setup WPA2-PSK:
WPA2 + HOTSPOT
[admin@HOTSPOT-WARUNG] > /interface wireless security-profiles set [find default=yes] mode=dynamic-keys authentication-types=wpa2-psk wpa2-pre-shared-key="wifi@warung2024"# user harus:# 1. connect wifi dengan password# 2. buka browser -> login hotspot dengan voucher
REKOMENDASI: Untuk hotspot publik (cafe, warung), pakai OPEN SYSTEM + hotspot. User cukup connect WiFi, lalu login voucher. Lebih simpel dan user-friendly.
HOTSPOT SETUP
CORE
Ini adalah inti dari panduan. Setup hotspot server di interface bridge (yang berisi ether2-4 dan wlan1).
Hotspot akan intercept semua HTTP traffic dan redirect ke login page.
CARA 1: WIZARD SETUP (TERMUDAH)
HOTSPOT WIZARD
# jalankan wizard[admin@HOTSPOT-WARUNG] > /ip hotspot setup# Step 1: Pilih interfaceHotspot interface: bridge# Step 2: DNS name (domain login page)DNS name: hotspot.warung.local# Step 3: IP address hotspotHotspot IP address: 192.168.10.1# Step 4: IP pool untuk clientIP pool: hotspot-poolPool range: 192.168.10.100-192.168.10.200# Step 5: SMTP server (optional, untuk email user)SMTP server: 0.0.0.0# Step 6: User admin hotspotHotspot user: adminPassword: ********# Wizard akan otomatis:# - buat DHCP server di bridge# - buat IP pool# - buat hotspot server# - tambahkan NAT rule (dst-nat port 80)# - tambahkan firewall filter (hs-auth, hs-unauth)# - upload default login page
CARA 2: MANUAL SETUP (LENGKAP)
Jika ingin setup manual step-by-step (untuk pemahaman lebih dalam):
MANUAL SETUP
# 1. buat IP pool untuk hotspot client[admin@HOTSPOT-WARUNG] > /ip pool add name="hotspot-pool" ranges=192.168.10.100-192.168.10.200# 2. buat DHCP server[admin@HOTSPOT-WARUNG] > /ip dhcp-server add name="dhcp-hotspot" interface=bridge address-pool="hotspot-pool" lease-time=10m authoritative=yes# 3. buat DHCP network[admin@HOTSPOT-WARUNG] > /ip dhcp-server network add address=192.168.10.0/24 gateway=192.168.10.1 dns-server=192.168.10.1,8.8.8.8 domain="warung.local"# 4. buat hotspot server[admin@HOTSPOT-WARUNG] > /ip hotspot add name="hotspot1" interface=bridge address-pool="hotspot-pool" profile="default" addresses-per-mac=3 disabled=no# 5. buat user admin hotspot[admin@HOTSPOT-WARUNG] > /ip hotspot user add name="admin" password="admin@hotspot"# 6. cek status[admin@HOTSPOT-WARUNG] > /ip hotspot print # NAME INTERFACE ADDRESS-POOL UPTIME 0 hotspot1 bridge hotspot-pool 0s
YANG DISETUP OTOMATIS OLEH HOTSPOT
KOMPONEN
DETAIL
FUNGSI
NAT dst-nat
chain=dstnat, port=80, redirect to hotspot
Redirect HTTP ke login page
Filter hs-auth
chain=forward, hotspot=auth
Allow user yang sudah login
Filter hs-unauth
chain=forward, hotspot=!auth
Drop user yang belum login
Filter hs-default
chain=input, hotspot port
Allow akses ke hotspot service
DHCP server
di interface bridge
Beri IP ke client
Files
/hotspot/ folder
Login page HTML, CSS, JS
PENTING: Jangan hapus atau ubah urutan rule firewall hs-auth, hs-unauth, hs-default. Hotspot tidak akan bekerja jika rule ini diutak-atik. Jika perlu custom firewall, tambahkan di ATAS rule hotspot.
HOTSPOT USER PROFILE
CORE
User profile mendefinisikan template untuk voucher: limit bandwidth, limit waktu, limit kuota, shared users, dll.
Satu profile bisa dipakai oleh banyak user.
BUAT PROFILE VOUCHER
USER PROFILE
# Profile 1: Voucher 1 Jam - 2Mbps/5Mbps[admin@HOTSPOT-WARUNG] > /ip hotspot user profile add name="1jam-2Mbps" rate-limit="2M/5M" idle-timeout="10m" keepalive-timeout="30s" shared-users=1 status-autorefresh="1m" on-login="" on-logout=""# Profile 2: Voucher 3 Jam - 3Mbps/7Mbps[admin@HOTSPOT-WARUNG] > /ip hotspot user profile add name="3jam-3Mbps" rate-limit="3M/7M" idle-timeout="15m" keepalive-timeout="30s" shared-users=1# Profile 3: Voucher 1 Hari - 5Mbps/10Mbps[admin@HOTSPOT-WARUNG] > /ip hotspot user profile add name="1hari-5Mbps" rate-limit="5M/10M" idle-timeout="30m" keepalive-timeout="30s" shared-users=2# Profile 4: Voucher 1 Minggu - 10Mbps/20Mbps[admin@HOTSPOT-WARUNG] > /ip hotspot user profile add name="1minggu-10Mbps" rate-limit="10M/20M" idle-timeout="1h" keepalive-timeout="30s" shared-users=3# Profile 5: Trial (gratis 15 menit)[admin@HOTSPOT-WARUNG] > /ip hotspot user profile add name="trial-15min" rate-limit="1M/2M" idle-timeout="5m" keepalive-timeout="30s" shared-users=1# list semua profile[admin@HOTSPOT-WARUNG] > /ip hotspot user profile print
PARAMETER PENTING USER PROFILE
PARAMETER
FUNGSI
CONTOH
rate-limit
Limit bandwidth upload/download
2M/5M (up 2Mbps, down 5Mbps)
idle-timeout
Logout otomatis jika tidak aktif
10m (10 menit)
keepalive-timeout
Interval ping ke client
30s (30 detik)
shared-users
Jumlah device yang bisa login bersamaan
1 (1 device saja)
status-autorefresh
Interval refresh status page
1m (1 menit)
on-login
Script dijalankan saat user login
:put "User logged in"
on-logout
Script dijalankan saat user logout
:put "User logged out"
transparent-proxy
Transparent proxy (HTTP/HTTPS)
yes/no
LIMIT UPTIME (MASA AKTIF VOUCHER)
Limit uptime ditentukan saat membuat user, bukan di profile. Ini masa aktif voucher.
FORMAT
ARTI
CONTOH
30m
30 menit
Trial / short session
2h
2 jam
Voucher 2 jam
1d
1 hari (24 jam)
Voucher harian
7d
7 hari
Voucher mingguan
30d
30 hari
Voucher bulanan
0s
Tidak ada limit
User permanen
LIMIT BYTES (KUOTA)
QUOTA
# limit kuota juga bisa diterapkan# saat membuat user, tambahkan:# limit-bytes-in = upload max (bytes)# limit-bytes-out = download max (bytes)# limit-bytes-total = total max (in + out)# contoh format:# 100M = 100 MB# 1G = 1 GB# 5G = 5 GB# nanti saat buat user:# /ip hotspot user add ... limit-bytes-total=1G
USER & VOUCHER
CORE
Buat user voucher yang akan dibagikan ke tamu. Setiap user punya username, password, profile, dan limit uptime.
Export voucher ke format yang bisa dicetak. Ada beberapa cara:
PRINT VOUCHER
# CARA 1: Print ke file[admin@HOTSPOT-WARUNG] > /ip hotspot user print file="voucher-list"# download file via WinBox: Files -> drag ke desktop# CARA 2: Print dengan format custom[admin@HOTSPOT-WARUNG] > /ip hotspot user print where profile="1jam-2Mbps" proplist=name,password,limit-uptime# CARA 3: Script export ke format print[admin@HOTSPOT-WARUNG] > /system script add name="print-voucher" source=":local users [/ip hotspot user find where profile=\"1jam-2Mbps\"]; :foreach u in=$users do={ :local name [/ip hotspot user get $u name]; :local pass [/ip hotspot user get $u password]; :put (\"User: \" . $name . \" | Pass: \" . $pass) }"# CARA 4: Pakai tool external (Mikhmon, etc)# Mikhmon = aplikasi web untuk manage hotspot# bisa generate + cetak voucher dengan template
DISABLE / HAPUS USER
MANAGE USER
# disable user (tidak bisa login, tapi data tetap ada)[admin@HOTSPOT-WARUNG] > /ip hotspot user disable [find name="1jam-001"]# enable user kembali[admin@HOTSPOT-WARUNG] > /ip hotspot user enable [find name="1jam-001"]# hapus user[admin@HOTSPOT-WARUNG] > /ip hotspot user remove [find name="1jam-001"]# hapus semua user expired[admin@HOTSPOT-WARUNG] > /ip hotspot user remove [find where uptime=limit-uptime]# reset uptime user (beri waktu lagi)[admin@HOTSPOT-WARUNG] > /ip hotspot user set [find name="1jam-001"] uptime=0s
WALLED GARDEN
CORE
Walled Garden memungkinkan akses ke situs tertentu TANPA login hotspot. Berguna untuk:
akses login page, situs pembayaran, situs internal, atau situs promosi.
Untuk situs yang tidak bisa di-resolve via DNS (misal IP langsung), pakai walled-garden-ip:
WALLED GARDEN IP
# izinkan akses ke IP server tertentu[admin@HOTSPOT-WARUNG] > /ip hotspot walled-garden-ip add dst-address="103.23.XX.XX/32" action=accept comment="Server Kantor"# izinkan akses ke subnet[admin@HOTSPOT-WARUNG] > /ip hotspot walled-garden-ip add dst-address="192.168.50.0/24" action=accept comment="Jaringan Server"
TIPS: Walled garden sering dipakai untuk "free access" ke situs tertentu (misal WhatsApp, Instagram) sebagai nilai tambah voucher. Atau untuk blokir situs berbahaya dengan action=reject.
CUSTOM LOGIN PAGE
CORE
Ganti tampilan login page default dengan design custom yang sesuai brand (cafe, warung, hotel).
File login page disimpan di folder /hotspot/ router.
STRUKTUR FILE HOTSPOT
FILES
# struktur folder /hotspot//hotspot/ |- login.html <- halaman login utama |- a.html <- halaman setelah login sukses |- rlogin.html <- redirect setelah login |- status.html <- halaman status user aktif |- logout.html <- halaman setelah logout |- error.html <- halaman error |- chap.js <- script CHAP authentication |- md5.js <- script MD5 hashing |- md5.htx <- MD5 template |- radvert.html <- advertisement page |- css/ <- folder CSS |- img/ <- folder gambar |- js/ <- folder JavaScript# cek file yang ada[admin@HOTSPOT-WARUNG] > /file print # NAME TYPE SIZE 0 flash directory 1 hotspot directory 2 hotspot/login.html html 2.1KB 3 hotspot/a.html html 1.2KB ...
TEMPLATE LOGIN.HTML
Contoh template login.html custom dengan design modern. Variabel RouterOS diawali dengan $:
LOGIN.HTML
# variabel penting yang tersedia:# $(link-login-only) - URL untuk submit login# $(link-orig) - URL asli yang mau diakses# $(error) - pesan error jika login gagal# $(chap-id) - CHAP ID (untuk CHAP auth)# $(chap-challenge) - CHAP challenge# $(link-login) - URL login page# $(link-orig-esc) - URL asli (escaped)# contoh struktur login.html:<!DOCTYPE html><html><head> <title>WARUNG WIFI - Login</title> <meta charset="UTF-8"> <style> body { font-family: Arial; background: #1a1a2e; } .login-box { max-width: 400px; margin: 100px auto; background: #16213e; padding: 30px; border-radius: 10px; color: white; } input { width: 100%; padding: 10px; margin: 8px 0; border: 1px solid #0f3460; background: #1a1a2e; color: white; border-radius: 5px; } button { width: 100%; padding: 12px; background: #e94560; color: white; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; } .error { color: #ff6b6b; margin: 10px 0; } </style></head><body> <div class="login-box"> <h1>WARUNG WIFI</h1> <p>Silakan login dengan voucher Anda</p> $(if error) <div class="error">$(error)</div> $(endif) <form name="login" action="$(link-login-only)" method="post"> <input type="hidden" name="dst" value="$(link-orig)"> <input type="text" name="username" placeholder="Username"> <input type="password" name="password" placeholder="Password"> <button type="submit">LOGIN</button> </form> <p style="text-align:center; margin-top:20px;"> Beli voucher di kasir</p> </div></body></html>
UPLOAD FILE CUSTOM
UPLOAD
# CARA 1: Drag & Drop via WinBox# 1. Buka WinBox -> menu Files# 2. Buka folder hotspot# 3. Drag file login.html dari komputer ke folder# 4. Timpa file lama# CARA 2: Via FTP# 1. Aktifkan FTP service: /ip service set ftp disabled=no# 2. Connect FTP client ke 192.168.10.1# 3. Upload file ke folder /hotspot/# CARA 3: Via WebFig# 1. Buka http://192.168.10.1# 2. Menu Files -> hotspot -> upload# setelah upload, refresh browser untuk lihat perubahan# tidak perlu reboot router
TIPS: Backup file login.html original sebelum dimodifikasi. Gunakan editor text (Notepad++, VSCode) dengan encoding UTF-8. Test di browser dengan mode incognito untuk hindari cache.
BANDWIDTH MANAGEMENT
CORE
Atur bandwidth per user hotspot agar tidak ada yang boros. Ada 2 cara: via user profile (rate-limit)
atau via simple queue (lebih fleksibel).
CARA 1: RATE-LIMIT DI USER PROFILE
RATE LIMIT
# sudah diset di user profile (lihat section 15)# contoh:[admin@HOTSPOT-WARUNG] > /ip hotspot user profile set [find name="1jam-2Mbps"] rate-limit="2M/5M"# saat user login, simple queue otomatis dibuat# berdasarkan rate-limit di profile
CARA 2: SIMPLE QUEUE
SIMPLE QUEUE
# limit total bandwidth hotspot (semua user)[admin@HOTSPOT-WARUNG] > /queue simple add name="total-hotspot" target="192.168.10.0/24" max-limit="30M/50M" queue="pcq-upload-default/pcq-download-default" comment="Total Hotspot"# limit per user (otomatis dibuat saat login)# cek queue aktif[admin@HOTSPOT-WARUNG] > /queue simple print # NAME TARGET MAX-LIMIT 0 total-hotspot 192.168.10.0/24 50M/30M 1 1jam-001 192.168.10.101 5M/2M 2 3jam-001 192.168.10.102 7M/3M# queue per user otomatis dihapus saat logout
PCQ (PER CONNECTION QUEUE)
PCQ membagi bandwidth secara dinamis per koneksi. Cocok untuk hotspot agar semua user dapat
bandwidth adil.
PCQ
# buat PCQ type[admin@HOTSPOT-WARUNG] > /queue type add name="pcq-hotspot-up" kind=pcq pcq-classifier="src-address" pcq-rate="2M" pcq-limit-at="1M" pcq-burst-rate="0" pcq-total-limit="0"[admin@HOTSPOT-WARUNG] > /queue type add name="pcq-hotspot-down" kind=pcq pcq-classifier="dst-address" pcq-rate="5M" pcq-limit-at="2M"# gunakan di queue total[admin@HOTSPOT-WARUNG] > /queue simple set [find name="total-hotspot"] queue="pcq-hotspot-up/pcq-hotspot-down"
PRIORITAS TRAFFIC
PRIORITAS
TRAFFIC
REKOMENDASI
1-3
VoIP, Video Call
Untuk paket premium
4-5
Browsing, Streaming
Default untuk semua
6-8
Download, P2P
Limit ketat untuk hemat bandwidth
USER MANAGER (RADIUS)
ADVANCED
User Manager adalah fitur built-in RouterOS untuk manajemen user hotspot terpusat.
Mendukung RADIUS, generate voucher massal, dan monitoring.
AKTIFKAN USER MANAGER
USER MANAGER
# aktifkan user manager[admin@HOTSPOT-WARUNG] > /tool user-manager database set use-encryption=yes# buat admin user manager[admin@HOTSPOT-WARUNG] > /tool user-manager user add username="admin" password="admin@userman" permissions="all"# daftarkan router ke user manager[admin@HOTSPOT-WARUNG] > /tool user-manager router add name="hotspot-warung" addresses="127.0.0.1"# akses User Manager via WebFig:# http://192.168.10.1/userman# atau via Tools -> User Manager di WinBox
BUAT PROFILE & USER DI USER MANAGER
USERMAN PROFILE
# buat profile via CLI[admin@HOTSPOT-WARUNG] > /tool user-manager profile add name="1jam" owner="admin" validity-time="1h" rate-limit-burst="2M/5M"[admin@HOTSPOT-WARUNG] > /tool user-manager profile add name="3jam" owner="admin" validity-time="3h" rate-limit-burst="3M/7M"[admin@HOTSPOT-WARUNG] > /tool user-manager profile add name="1hari" owner="admin" validity-time="1d" rate-limit-burst="5M/10M"# generate voucher massal[admin@HOTSPOT-WARUNG] > /tool user-manager user create-and-activate-profile profiles="1jam" count=10 owner="admin"# cek user yang dibuat[admin@HOTSPOT-WARUNG] > /tool user-manager user print
INTEGRASI HOTSPOT + USER MANAGER
INTEGRASI
# set hotspot pakai RADIUS[admin@HOTSPOT-WARUNG] > /ip hotspot set [find name="hotspot1"] use-radius=yes# buat RADIUS entry[admin@HOTSPOT-WARUNG] > /radius add service=hotspot secret="radius@secret" address=127.0.0.1# sekarang user di User Manager bisa login di hotspot
CATATAN: User Manager memberatkan CPU RB941. Untuk hotspot kecil (<50 user), lebih baik pakai hotspot user biasa. User Manager cocok untuk hotspot skala menengah-besar.
MAC COOKIE
ADVANCED
MAC Cookie menyimpan MAC address device yang sudah login. Saat device reconnect, tidak perlu
login ulang selama cookie masih aktif.
SETUP MAC COOKIE
MAC COOKIE
# aktifkan MAC cookie di hotspot[admin@HOTSPOT-WARUNG] > /ip hotspot set [find name="hotspot1"] cookie-transform=none mac-cookie=yes mac-cookie-timeout=3d# parameter:# mac-cookie=yes <- aktifkan fitur# mac-cookie-timeout=3d <- cookie berlaku 3 hari# setelah 3 hari, user harus login ulang# cek MAC cookie aktif[admin@HOTSPOT-WARUNG] > /ip hotspot cookie print # FROM-MAC-ADDRESS TO-MAC-ADDRESS DOMAIN 0 A1:B2:C3:D4:E5:F6 00:00:00:00:00:00# hapus MAC cookie (paksa user login ulang)[admin@HOTSPOT-WARUNG] > /ip hotspot cookie remove [find from-mac-address="A1:B2:C3:D4:E5:F6"]# hapus semua MAC cookie[admin@HOTSPOT-WARUNG] > /ip hotspot cookie remove [find]
TIMEOUT RECOMMENDED
SKENARIO
TIMEOUT
KETERANGAN
Cafe / Warung
1d - 3d
Tamu sering kembali, tidak perlu login tiap datang
Hotel
7d
Sesuai durasi menginap rata-rata
Kantor
30d
Karyawan tetap, jarang ganti device
Event / Pameran
3h - 6h
Pengunjung singkat, perlu rotasi cepat
Kos-kosan
7d
Penghuni tetap, mingguan cukup
TIPS: MAC cookie meningkatkan user experience - tamu tidak perlu input voucher berulang. Tapi hati-hati: jika device diganti (MAC berubah), user harus login ulang. Juga, MAC address bisa di-spoof oleh user advanced.
TRIAL ACCESS (GRATIS)
ADVANCED
Berikan akses gratis terbatas untuk menarik pelanggan. Setelah trial habis, user diarahkan beli voucher.
Ada beberapa metode: MAC-based trial, time-based, atau login page dengan tombol trial.
CARA 1: TRIAL USER PROFILE
TRIAL PROFILE
# buat profile trial khusus[admin@HOTSPOT-WARUNG] > /ip hotspot user profile add name="trial" rate-limit="1M/2M" idle-timeout="5m" keepalive-timeout="30s" shared-users=1# buat user trial dengan username/password tetap[admin@HOTSPOT-WARUNG] > /ip hotspot user add name="trial" password="trial" profile="trial" limit-uptime="15m" comment="Free Trial"# user bisa login dengan:# username: trial# password: trial# durasi: 15 menit# bandwidth: 1Mbps up / 2Mbps down
CARA 2: MAC-BASED TRIAL
Setiap MAC address baru dapat trial otomatis 15 menit. Setelah itu harus beli voucher.
MAC TRIAL
# aktifkan MAC cookie dengan timeout pendek[admin@HOTSPOT-WARUNG] > /ip hotspot set [find name="hotspot1"] mac-cookie=yes mac-cookie-timeout="15m"# buat user default untuk MAC baru[admin@HOTSPOT-WARUNG] > /ip hotspot user add name="mac-trial" password="" profile="trial" limit-uptime="15m"# set hotspot pakai MAC authentication[admin@HOTSPOT-WARUNG] > /ip hotspot set [find name="hotspot1"] mac-auth-mode="mac-password"# sekarang setiap device baru dapat trial 15 menit# setelah itu harus login dengan voucher berbayar
CARA 3: TOMBOL TRIAL DI LOGIN PAGE
Tambahkan tombol "Coba Gratis 15 Menit" di login page. User klik tombol, langsung dapat akses.
TRIAL BUTTON
# tambahkan di login.html:<form action="$(link-login-only)" method="post"> <input type="hidden" name="dst" value="$(link-orig)"> <input type="hidden" name="username" value="trial"> <input type="hidden" name="password" value="trial"> <button type="submit" style="background: #28a745;"> Coba Gratis 15 Menit </button></form># user klik tombol -> auto login dengan user "trial"# dapat akses 15 menit dengan bandwidth terbatas# setelah habis, harus beli voucher
PERINGATAN: Trial bisa disalahgunakan (user ganti MAC address, dapat trial lagi). Untuk hindari ini, pakai MAC cookie + batasi jumlah trial per MAC. Atau pakai sistem voucher saja tanpa trial.
MONITORING & REPORTING
ADVANCED
Monitor penggunaan hotspot: siapa yang online, berapa bandwidth dipakai, voucher mana yang laku, dll.
CEK USER AKTIF
ACTIVE USERS
# list user hotspot yang sedang online[admin@HOTSPOT-WARUNG] > /ip hotspot active print # USER ADDRESS MAC-ADDRESS UPTIME 0 1jam-001 192.168.10.101 A1:B2:C3:D4:E5:F6 45m 12s 1 3jam-001 192.168.10.102 B2:C3:D4:E5:F6:01 2h 15m 2 admin 192.168.10.50 C3:D4:E5:F6:01:02 5d 3h# detail per user[admin@HOTSPOT-WARUNG] > /ip hotspot active print detail # user="1jam-001" server="hotspot1" domain="" address=192.168.10.101 mac-address=A1:B2:C3:D4:E5:F6 login-by=cookie uptime=45m 12s idle-time=1m 23s session-timeout=1h bytes-in=125.4MB bytes-out=45.2MB packets-in=15432 packets-out=12100# kick user (logout paksa)[admin@HOTSPOT-WARUNG] > /ip hotspot active remove [find user="1jam-001"]# atau via menu[admin@HOTSPOT-WARUNG] > /ip hotspot active logout [find user="1jam-001"]
STATISTIK HOTSPOT
STATISTICS
# statistik hotspot[admin@HOTSPOT-WARUNG] > /ip hotspot print # NAME INTERFACE ADDRESS-POOL UPTIME USERS 0 hotspot1 bridge hotspot-pool 15d 3h 5# hit count (berapa kali user login)[admin@HOTSPOT-WARUNG] > /ip hotspot host print # ADDRESS MAC-ADDRESS LAST-AUTHORIZED-BY STATUS 0 192.168.10.101 A1:B2:C3:D4:E5:F6 pap authorized 1 192.168.10.102 B2:C3:D4:E5:F6:01 pap authorized 2 192.168.10.103 C3:D4:E5:F6:01:02 unauthorized# cek user yang sudah expired[admin@HOTSPOT-WARUNG] > /ip hotspot user print where uptime=limit-uptime
LOG HOTSPOT
LOG
# lihat log hotspot[admin@HOTSPOT-WARUNG] > /log print where topics="hotspot"nov/15 14:32:08 hotspot,info 192.168.10.101 login succeeded for user 1jam-001nov/15 14:45:23 hotspot,info 192.168.10.102 login succeeded for user 3jam-001nov/15 15:32:08 hotspot,info 192.168.10.101 logout for user 1jam-001 (session timeout)# filter log login gagal[admin@HOTSPOT-WARUNG] > /log print where topics="hotspot" and message~"failed"# aktifkan logging detail[admin@HOTSPOT-WARUNG] > /system logging add topics=hotspot action=memory
REPORTING SCRIPT
REPORT
# script laporan harian[admin@HOTSPOT-WARUNG] > /system script add name="daily-report" source=":local total [/ip hotspot user count]; :local active [/ip hotspot active count]; :local date [/system clock get date]; :put (\"Date: \" . $date); :put (\"Total Users: \" . $total); :put (\"Active Now: \" . $active)"# jalankan manual[admin@HOTSPOT-WARUNG] > /system script run daily-report# jadwalkan otomatis tiap hari jam 23:59[admin@HOTSPOT-WARUNG] > /system scheduler add name="daily-report" interval=1d start-time=23:59:00 on-event=daily-report
Masalah umum hotspot dan solusinya. Ikuti langkah diagnostic dari yang paling sederhana.
USER TIDAK DIREDIRECT KE LOGIN PAGE
KEMUNGKINAN PENYEBAB:
1. Cek hotspot aktif: /ip hotspot print - harus enabled
2. Cek NAT dst-nat: /ip firewall nat print - harus ada rule redirect port 80
3. Cek user akses HTTPS (bukan HTTP) - hotspot hanya intercept HTTP
4. Cek DNS - user harus bisa resolve domain
5. Coba akses manual: http://192.168.10.1 atau http://hotspot.warung.local
6. Clear browser cache & cookies
7. Cek firewall tidak blokir port 80
LOGIN GAGAL / USERNAME PASSWORD SALAH
KEMUNGKINAN PENYEBAB:
1. Cek user ada: /ip hotspot user print
2. Cek user tidak disabled: disabled=no
3. Cek limit uptime belum habis: uptime < limit-uptime
4. Cek profile ada: /ip hotspot user profile print
5. Cek shared users belum penuh
6. Reset password: /ip hotspot user set [find name="user"] password="newpass"
7. Cek log: /log print where topics="hotspot" and message~"failed"
USER LOGIN TAPI TIDAK BISA INTERNET
KEMUNGKINAN PENYEBAB:
1. Cek NAT masquerade: /ip firewall nat print - harus ada
2. Cek DHCP client WAN: /ip dhcp-client print - harus bound
3. Test ping dari router: /ping 8.8.8.8
4. Cek firewall forward: /ip firewall filter print - hs-auth harus accept
5. Cek DNS: /ip dns print - allow-remote-requests=yes
6. Cek queue tidak limit 0: /queue simple print
7. Cek routing: /ip route print - harus ada default route
HOTSPOT LAMBAT / LELET
KEMUNGKINAN PENYEBAB:
1. Cek CPU load: /system resource print - jika >80%, router overload
2. Cek jumlah user aktif: /ip hotspot active print - RB941 max ~20-30 user
3. Cek bandwidth total: /tool traffic-monitor interface=bridge
4. Kurangi user concurrent atau upgrade hardware
5. Disable fitur tidak perlu (user manager, transparent proxy)
6. Cek WiFi interference: /interface wireless scan
7. Restart router jika perlu (memory leak)
DHCP TIDAK BERI IP KE CLIENT
KEMUNGKINAN PENYEBAB:
1. Cek DHCP server aktif: /ip dhcp-server print
2. Cek pool tidak habis: /ip pool print
3. Cek interface bridge: /interface bridge port print
4. Cek IP address di bridge: /ip address print
5. Restart DHCP: /ip dhcp-server set [find] disabled=yes; :delay 2s; set [find] disabled=no
6. Cek client dapat APIPA (169.254.x.x) = DHCP gagal
VOUCHER HABIS TAPI USER MASIH ONLINE
KEMUNGKINAN PENYEBAB:
1. Cek keepalive-timeout di profile: /ip hotspot user profile print
2. Set keepalive-timeout=30s untuk deteksi cepat
3. Cek status-autorefresh: status-autorefresh=1m
4. Logout manual: /ip hotspot active remove [find user="xxx"]
5. Cek NTP sinkron: /system ntp client print
FIREWALL RULE HOTSPOT HILANG
KEMUNGKINAN PENYEBAB:
1. Cek rule hotspot: /ip firewall filter print - harus ada hs-auth, hs-unauth, hs-default
2. Jika hilang, disable & enable hotspot: /ip hotspot set [find] disabled=yes; :delay 2s; set [find] disabled=no
3. Jangan hapus manual rule hotspot
4. Jika perlu custom firewall, taruh DI ATAS rule hotspot
5. Backup config sebelum modifikasi firewall