AI Insights
Generate a summary and suggested tags for this post.
Butuh blokir situs judi, medsos jam kerja, atau konten dewasa? MikroTik punya 3 metode utama untuk blokir website — masing-masing punya kelebihan dan trade-off tersendiri.

Perbandingan 3 Metode
| Metode | HTTPS? | Beban CPU | Akurasi | Kesulitan |
|---|---|---|---|---|
| DNS Static | ✅ Ya | Ringan | Sedang | Mudah |
| Layer 7 | ❌ Terbatas | Berat | Tinggi | Sulit |
| Web Proxy | ❌ HTTP saja | Sedang | Tinggi | Sedang |
Metode 1: DNS Static (Paling Simpel)
Redirect domain ke IP lokal:
/ip dns static
add name=facebook.com address=127.0.0.1
add name=www.facebook.com address=127.0.0.1
add name=m.facebook.com address=127.0.0.1Syarat: client harus pakai DNS MikroTik (set via DHCP).
Metode 2: Layer 7 Protocol
Blokir berbasis regex di paket:

/ip firewall layer7-protocol
add name=medsos regexp="^.+(facebook|instagram|tiktok).+\$"
/ip firewall filter
add chain=forward layer7-protocol=medsos action=drop⚠️ Layer 7 boros CPU. Untuk trafik HTTPS, hanya bisa deteksi handshake awal.
Metode 3: Web Proxy
Aktifkan Web Proxy → set redirect:
/ip proxy set enabled=yes port=8080
/ip proxy access add dst-host=*facebook* action=deny
/ip firewall nat add chain=dstnat protocol=tcp dst-port=80 \
action=redirect to-ports=8080⚠️ Web Proxy hanya untuk HTTP, HTTPS harus SSL bump (kompleks).
Kombinasi = Paling Efektif
Best practice:
- DNS Static → blokir domain populer
- Address List → blokir IP CDN
- Layer 7 → catch fallback
Contoh: Blokir Judi Online
/ip dns static
add name=domain-judi.com address=127.0.0.1
/ip firewall address-list
add address=judi-cdn-ip list=blacklist
/ip firewall filter
add chain=forward dst-address-list=blacklist action=dropKesimpulan
Untuk pemula → DNS Static paling worth-it (mudah + ringan). Untuk kontrol ketat → gabung dengan Address List. Layer 7 dan Web Proxy hanya dipakai kalau memang butuh regex/HTTP filtering spesifik karena beban CPU besar.
