fyi packet-mark sample Upaket-192.168.168.17
i've following script, where i missing (i'm noob in scripting -_- )
Mikrotik OSv6.44.2
Code: Select all
:foreach cmt in=[/queue tree find max-limit="1000k"] do={
:local split [:tostr [/queue tree get $cmt packet-mark]];
:global ipinv
:set ipinv [:pick $split 6 [:len $split]];
:if ([/ping $ipinv count=4] = 0) do={
/ip firewall mangle remove [find where comment=("Upaket-"."$ipinv")];
/ip firewall mangle remove [find where comment=("Upload-"."$ipinv")];
/ip firewall mangle remove [find where comment=("Dpaket-"."$ipinv")];
/ip firewall mangle remove [find where comment=("Download-"."$ipinv")];
/queue tree remove [find where packet-mark=("Dpaket-"."$ipinv")];
/queue tree remove [find where packet-mark=("Download-"."$ipinv")];
/queue tree remove [find where packet-mark=("Upaket-"."$ipinv")];
/queue tree remove [find where packet-mark=("Upload-"."$ipinv")];
}}
:else [/tool fetch url="https://api.telegram.org/botyyyy:xxxx/sendMessage\?chat_id=-zzzzz&text=error" mode=http http-method=post keep-result=no;];