Pengantar
Hotspot pada MikroTik adalah solusi yang populer untuk menyediakan akses internet berbasis otentikasi kepada pengguna di jaringan publik, kampus, atau kantor. Sistem ini memungkinkan administrator mengatur tarif, kebijakan bandwidth, serta mengelola user secara terpusat. Pada artikel ini kami menjelaskan secara lengkap cara mengkonfigurasi MikroTik sebagai server hotspot, termasuk persiapan, konfigurasi dasar, penyesuaian halaman login, dan pemecahan masalah umum.
Prasyarat
- RouterOS versi 6.x atau lebih baru.
- Minimal dua interface jaringan: satu terhubung ke internet (WAN) dan satu ke LAN/klien.
- Alamat IP statik atau DHCP pada interface WAN.
- Akses ke Winbox/WebFig atau SSH untuk konfigurasi.
| Interface | IP Address | Keterangan |
|---|---|---|
| ether1 | DHCP (WAN) | Koneksi ke ISP |
| ether2 | 192.168.88.1/24 | Jaringan hotspot |
Langkah-langkah Setup Hotspot
1. Membuat Bridge (Opsional)
Jika ingin menggabungkan beberapa port LAN menjadi satu segmen, buat bridge terlebih dahulu.
/interface bridge add name=bridge-hotspot/interface bridge port add bridge=bridge-hotspot interface=ether2/interface bridge port add bridge=bridge-hotspot interface=ether3
2. Menetapkan IP pada Interface Hotspot
/ip address add address=192.168.88.1/24 interface=bridge-hotspot comment="Hotspot LAN"
3. Menyiapkan DHCP Server untuk Klien
/ip pool add name=dhcp-pool-hotspot ranges=192.168.88.10-192.168.88.200/ip dhcp-server add name=dhcp-hotspot interface=bridge-hotspot address-pool=dhcp-pool-hotspot disabled=no/ip dhcp-server network add address=192.168.88.0/24 gateway=192.168.88.1 dns-server=8.8.8.8,8.8.4.4
4. Membuat Hotspot Server
Gunakan wizard untuk proses cepat atau set manual seperti contoh di bawah.
/ip hotspot profile add name=hsprof hotspot-address=192.168.88.1 dns-name=hotspot.local/ip hotspot add name=hs1 interface=bridge-hotspot profile=hsprof address-pool=dhcp-pool-hotspot
5. Mengatur User
Anda dapat menambahkan user secara manual atau mengaktifkan login anonim.
/ip hotspot user add name=admin password=admin123/ip hotspot user add name=guest password=guest limit-uptime=1h
6. Mengaktifkan NAT (Masquerade) untuk Akses Internet
/ip firewall nat add chain=srcnat out-interface=ether1 action=masquerade
7. Membuat Firewall Rules untuk Memproteksi Hotspot
/ip firewall filter add chain=forward connection-state=established,related action=accept/ip firewall filter add chain=forward src-address=192.168.88.0/24 action=accept/ip firewall filter add chain=forward dst-address=192.168.88.0/24 action=drop
Kustomisasi Halaman Login
Halaman login dapat diubah dengan mengganti file HTML, gambar, atau menambah skrip JavaScript.
- Upload file ke folder
hotspotpada router menggunakan Winbox > Files. - Ganti
login.htmldengan desain Anda. - Jika menggunakan logo, pastikan ukuran tidak melebihi 200KB agar tidak memperlambat loading.
Contoh file login sederhana
<!DOCTYPE html><html lang="id"><head> <meta charset="UTF-8"> <title>Login Hotspot</title> <style> body{font-family:Arial;background:#fafafa;padding:30px;} .box{max-width:400px;margin:auto;background:#fff;padding:20px;border:1px solid #ddd;} input{width:100%;padding:10px;margin:5px 0;} button{background:#4CAF50;color:#fff;border:none;padding:10px;width:100%;} </style></head><body><div class="box"> <h2 style="text-align:center;">Selamat Datang</h2> <form method="post" action="/login"> <input type="text" name="username" placeholder="Username" required> <input type="password" name="password" placeholder="Password" required> <button type="submit">Login</button> </form></div></body></html> Pastikan nama file tetap login.html dan letakkan di folder hotspot supaya router otomatis menemukannya.
Troubleshoot Umum
- Klien tidak mendapatkan IP: Periksa DHCP pool, pastikan tidak ada IP yang bentrok.
- Halaman login tidak muncul: Cek firewall filter, pastikan port 80/443 tidak diblokir.
- Pengguna terputus setelah login: Pastikan NAT masquerade diinterface WAN aktif.
- Bandwidth tidak terbatas sesuai kebijakan: Tambahkan limit pada profile atau queue.
- Hotspot tidak menampilkan voucher: Pastikan
/tool user-managertidak aktif atau cek log hotspot.
Log & Monitoring
/log print where topics~"hotspot"/ip hotspot active print/ip hotspot user print
Gunakan /tool graphing atau Torch untuk memantau trafik realtime.
