src-address

How to print or find a entries using ‘src-address’ or ‘dst-address’

/ip fi man print where chain=prerouting

I get some result:

12    chain=prerouting action=accept src-address=192.168.1.100 log=no log-prefix="" [code]

but

[code]/ip fi man print where src-address=192.168.1.100

I got none,

also with

/ip fi man print where src-address=192.168.1.100/32

how to properly enter ‘src-address’ or ‘dst-address’?

the hint is always:

SrcAddress ::= [!]Range
  Range ::= A.B.C.D[-A.B.C.D |0..32 |/A.B.C.D ]    (IP address range

Documentation seems really bad on this stuff..

It seems to work if the address is quoted:

/ip fi fil print where src-address="192.168.10.0/24"
Flags: X - disabled, I - invalid, D - dynamic 
 0   
      chain=forward action=drop src-address=192.168.10.0/24 dst-address=192.168.0.0/24 log=no log-prefix=""

The following also seems to work for me, although this was a guess and I can’t find it mentioned anywhere online

/ip fi fil print where src-address in 192.168.8.0/22 
Flags: X - disabled, I - invalid, D - dynamic 
 0    
      chain=forward action=drop src-address=192.168.10.0/24 
      dst-address=192.168.0.0/24 log=no log-prefix=""

Use quotes :slight_smile:.

/ip fi man print where src-address="192.168.1.100"

edit: LOL, that timing :slight_smile:.

Oh, so silly me. :laughing: