Digital Note

Grab a coffe, take a seat, maybe listen to some music and relax by reading our digital daily diary. We want to share our minds and know how with you and the whole world!

Blog phones

Anti netcut, kill dan block user pengguna netcut di mikrotik

Terkadang pengguna netcut hanya beralasan jahil tapi lama-kelamaan jadi ketagihan, dan dampaknya buruk bagi pemilik usaha atau institusi. Berikut saya share script untuk melakukan pengecekan user menggunakan netcut atau tidak, lalu jika terdeteksi netcut maka akan langsung di block

/ip firewall address-list add list=netcut address=www.arcai.com
/ip firewall mangle add action=add-src-to-address-list address-list=NetcutUser address-list-timeout=1h5m chain=prerouting comment="Deteksi Netcut" dst-address-list=netcut dst-port=80 protocol=tcp
/ip firewall filter add action=drop chain=forward comment=NetCut src-address-list=NetcutUser
/system scheduler add interval=10m name="--AutoBlockNetcut--"

Buka System Scheduler dan masukan script ini ke dalam –AutoBlockNetcut–

local a [/ip firewall address-list get [find list="NetcutUser"] address]
local b [/ip hotspot active get [find address=$a] mac-address]
if ($a != "") do={[
/ip hotspot ip-binding add mac-address="$b" address="$a" type=blocked
/ip firewall address-list remove [find address="$a"]
/system scheduler add name ($a)  interval="01:00:00" on "/ip hotspot ip-binding remove [find mac-address=$b]
/system scheduler remove [find name=$a]"
]}

Sumber: ZahraNet [https://www.youtube.com/watch?v=9GM78mV5j6U]

Trackback from your site.

Leave a comment