Community discussions

 
djnewbie
just joined
Topic Author
Posts: 2
Joined: Sat Nov 10, 2018 9:50 am

Clearing Mangle and Queue tree

Thu Aug 15, 2019 4:07 am

hi there master and guru, i've these script (below) to clearing Mangle and Queue tree since my hotspot on logout script did'nt much cover it all.
it'll run in terminal but nothing is cleared. my intension is to get ip address from dhcp-server lease and do ping to it's ip, when RTO then scheduled script should clearing mangle and queue tree.
which wrong with these script, please help me. thank you

/ip dhcp-server lease { :foreach i in=[find dynamic] do={
:local ips [get $i active-address];
:if ([/ping $ips count=5] = 0) do={
:delay 3s;
/ip firewall mangle remove [find where comment=("upaket-"."$ips")];
/ip firewall mangle remove [find where comment=("uyoutube1-"."$ips")];
/ip firewall mangle remove [find where comment=("uzallpaket-"."$ips")];
/ip firewall mangle remove [find where comment=("dpaket-"."$ips")];
/ip firewall mangle remove [find where comment=("dyoutube1-"."$ips")];
/ip firewall mangle remove [find where comment=("dzallpaket-"."$ips")];
/queue tree remove [find where packet-mark=("upaket"."$ips")];
/queue tree remove [find where packet-mark=("uyoutube1"."$ips")];
/queue tree remove [find where packet-mark=("uzallpaket"."$ips")];
/queue tree remove [find where packet-mark=("dpaket"."$ips")];
/queue tree remove [find where packet-mark=("dyoutube1"."$ips")];
/queue tree remove [find where packet-mark=("dzallpaket"."$ips")];
}
}
}

Who is online

Users browsing this forum: No registered users and 10 guests