How to filter "ip firewall address-list"

Hello, I want print all the address-list records if the address is inside a subnet

If I enter the exact match, is ok:

 
 > ip firewall address-list print where address=46.229.168.10
Flags: X - disabled, D - dynamic 
 #   LIST                      ADDRESS                                       CREATION-TIME        TIMEOUT             
 0 D ;;; test
     test                     46.229.168.10                               jul/24/2017 13:06:13 11w2d3h14m29s

but if I run

 ip firewall address-list print where address=46.0.0.0/8

the result is null

There is any option to filter by network via console/API ?

Thanks!!!

up up! :slight_smile:
Any idea?

Hi,

I know it’s an old topic, but the answer is simple using the list name:

/ip firewall address-list print where list="list_name"

Or using filter by address and not by address list name:

/ip firewall address-list print where address ~"46"

/ip firewall address-list print where address ~"192.168.1.[8]"

/ip firewall address-list print where address ~"55.[1]"

very cool, learned something new again, the part, thank you for sharing

You can use POSIX regular expressions, with some exceptions.

Cool, thank you