to allow printing out rules grouped by the interface.
this would help to emulate some of hte behavior seen by other venders, such as Cisco Pix, where large rulesets might be accross multiple interfaces, and it would be nice to list all of the rules for particular interfaces (either direction in or out) together.
To filter out interfaces that don’t have rule associated:
:foreach INT in=[/int find] do={:local rules [/ip fir fil find in-interface=[/int get $INT name]]; :if ([:len $rules] > 0) do={/ip fir fil print where in-interface=[/int get $INT name]}}
I haven’t found a clean way of sorting firewall rules by a specific property, so I made a script to show me the output I want. Also, this works great if executed remotely as you can retrieve specific information for input into other systems.