How can i get or print current bytes value of specific rule - I tried something like this but i think it’s not working:
:local txbytes [/ip firewall mangle get [/ip firewall mangle find where chain=prerounting] bytes] ; :put $txbytes
Thank you!
How can i get or print current bytes value of specific rule - I tried something like this but i think it’s not working:
:local txbytes [/ip firewall mangle get [/ip firewall mangle find where chain=prerounting] bytes] ; :put $txbytes
Thank you!
:local variable [/ip firewall mangle get number=1 bytes]
:log info $variable;
this gives you the value on rule number 1.
you can also use
find where
and use a condition to find a rule but make sure the result is only one rule, otherwise the logic breaks down here: you cannot assign mutiple values to a single variable.
also I use Terminal to workout the correct syntax . you can use Tab key to show the list of available commands or values to use