FIREWALL MIKROTIK: PROTEKSI DDOS, BOTNET & BLOKIR VPN/PROXY
Oleh: Sophan Ahmad
PENDAHULUAN
Jaringan tanpa proteksi rentan terhadap serangan DDoS, botnet, dan penyalahgunaan VPN/proxy oleh klien. DDoS (Distributed Denial of Service) membanjiri server/jaringan dengan trafik sampah. Botnet adalah jaringan komputer yang terinfeksi malware untuk melakukan serangan atau scanning. Sedangkan VPN/proxy sering dipakai klien nakal untuk menghindari aturan bandwidth atau blokir.
MikroTik RouterOS menyediakan fitur firewall lengkap untuk mitigasi masalah-masalah ini. Dokumen ini akan memberikan tutorial praktis step-by-step.
============================================================
PRINSIP KERJA FIREWALL MIKROTIK
-
Chains: Input (untuk router itu sendiri), Forward (trafik melewati router), Output (dari router).
-
Connection tracking: mencatat status koneksi.
-
Filter rules: untuk menerima, drop, atau log paket.
-
Mangle rules: untuk menandai paket/koneksi.
============================================================
MITIGASI DDOS & BOTNET
1. BLOKIR SYN FLOOD
/ip firewall filter add chain=input protocol=tcp tcp-flags=syn connection-limit=30,32 action=drop comment="Drop SYN flood"
2. BLOKIR UDP FLOOD
/ip firewall filter add chain=forward protocol=udp connection-limit=30,32 action=drop comment="Drop UDP flood"
3. BLOKIR ICMP FLOOD
/ip firewall filter add chain=input protocol=icmp limit=50,5 action=accept comment="Allow limited ICMP"
/ip firewall filter add chain=input protocol=icmp action=drop comment="Drop excess ICMP"
4. DETEKSI BOTNET (SCANNING/ANOMALI)
Blokir koneksi yang membuka terlalu banyak port dalam waktu singkat:
/ip firewall filter add chain=forward protocol=tcp psd=21,3s,3,1 action=drop comment="Drop port scan"
Log koneksi mencurigakan:
/ip firewall filter add chain=forward protocol=tcp connection-limit=100,32 action=log log-prefix="BOTNET? "
============================================================
BLOKIR VPN & PROXY
VPN & Proxy sering memakai port & signature tertentu. Kita bisa mendeteksi & memblokir port umum mereka.
1. BLOKIR PSIPHON
Psiphon sering pakai TCP port 443/80 tapi ciri khasnya menginisiasi banyak koneksi TLS cepat:
/ip firewall filter add chain=forward protocol=tcp tcp-flags=syn connection-limit=10,32 dst-port=443,80 action=drop comment="Drop Psiphon"
2. BLOKIR SHADOWSOCKS
Biasanya pakai TCP/UDP di port acak tapi default 8388:
/ip firewall filter add chain=forward protocol=tcp dst-port=8388 action=drop comment="Drop Shadowsocks TCP"
/ip firewall filter add chain=forward protocol=udp dst-port=8388 action=drop comment="Drop Shadowsocks UDP"
3. BLOKIR OPENVPN
OpenVPN default di UDP 1194:
/ip firewall filter add chain=forward protocol=udp dst-port=1194 action=drop comment="Drop OpenVPN"
4. BLOKIR WIREGUARD
WireGuard pakai UDP default 51820:
/ip firewall filter add chain=forward protocol=udp dst-port=51820 action=drop comment="Drop WireGuard"
5. BLOKIR WEB PROXY / HTTP TUNNEL
Blokir koneksi HTTP CONNECT atau header tertentu dengan layer7 (regex):
/ip firewall layer7-protocol add name=proxy-http regexp="^CONNECT"
/ip firewall filter add chain=forward layer7-protocol=proxy-http action=drop comment="Drop HTTP Proxy"
============================================================
TIPS & BEST PRACTICE
✅ Simpan konfigurasi firewall secara berkala.
✅ Monitor log secara aktif untuk pola aneh.
✅ Jangan hanya mengandalkan satu metode, kombinasikan.
✅ Uji coba setiap aturan di jam sepi sebelum diterapkan penuh.
============================================================
PENUTUP
Firewall MikroTik cukup kuat untuk menghadapi DDoS ringan-menengah, botnet scanning, dan klien nakal yang mencoba VPN/proxy. Dengan skrip sederhana di atas, Anda sudah selangkah lebih aman.
Selamat mencoba & semoga jaringan Anda semakin stabil dan aman.


Juli 20, 2025
Rufaidah-network