Community discussions

MikroTik App
 
snowch
just joined
Topic Author
Posts: 10
Joined: Sun Dec 04, 2022 11:28 am

how to find all static '/ip firewall mangle' rules

Fri Dec 09, 2022 3:35 am

The following allows me to print all static rules:
/ip firewall mangle print static
Flags: X - disabled, I - invalid, D - dynamic 
 ...
However, the same does not work for find:
/ip firewall mangle find static
{{no output}}
How can I find static rules?
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: how to find all static '/ip firewall mangle' rules  [SOLVED]

Fri Dec 09, 2022 6:04 pm

if you print, you print,
if you find, you not print
you must print (or put) if you want see something...

if is static, is not dynamic
:put [/ip firewall mangle find where !dynamic]
# equivalent to
:put [/ip firewall mangle find where dynamic=no]
and you obtain only IDs because find is for scripting (do not use :put on scripting for obtain find results....), not for print/put on terminal...

Who is online

Users browsing this forum: ayetta, nonolk, senseivita and 103 guests