Filter for multiple subnets

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Filter for multiple subnets

L0 Member

 My filter is not working, can you tell me why?

 

((addr.src notin '172.0.0.0/8') or ( addr.src notin 10.0.0.0/8 ))      and      ((addr.src notin '180.0.0.0/8') or ( addr.src notin 100.0.0.0/8 ) or ( addr.src notin 200.0.0.0/8 ))

or for easier reading;

(NOT or NOT) and (NOT or NOT)

 

Basically,

I want to see all traffic that does not source from my internal, AND does not include some of our other IP's

 

I have tried a bunch of syntax, but when I do the ((addr.src notin '172.0.0.0/8') or ( addr.src notin 10.0.0.0/8 )) (or other stuff), it runs, and returns those subnets anyway

 

2 accepted solutions

Accepted Solutions

Cyber Elite
Cyber Elite

Basically you want to exclude traffic that comes from any of those 5 subnets?

 

(addr.src notin '172.0.0.0/8') and ( addr.src notin 10.0.0.0/8 )  and (addr.src notin '180.0.0.0/8') and ( addr.src notin 100.0.0.0/8 ) and ( addr.src notin 200.0.0.0/8 )

 

or

 

!((addr.src in '172.0.0.0/8') and ( addr.src in 10.0.0.0/8 )  and (addr.src in '180.0.0.0/8') and ( addr.src in 100.0.0.0/8 ) and ( addr.src in 200.0.0.0/8 ))

Enterprise Architect, Security @ Cloud Carib Ltd
Palo Alto Networks certified from 2011

View solution in original post

Cyber Elite
Cyber Elite

the syntax will be AND for all the subnets

 

(notin A) AND (notin B) AND (notin C) AND (notin D)

 

you can only have 1 subnet per source field, so normally an 'AND' between 2 subnets would create no hits as you can't have both subnets in the same field, but the use of 'not' makes the 'and' an 'or' ("not and not" makes a boolean 'or')

 

 

(notin A) AND (notin B) AND (notin C) AND (notin D)

==

!((in A) OR (in B) OR (in C) OR (in D))

 

Tom Piens
PANgurus - Strata specialist; config reviews, policy optimization

View solution in original post

2 REPLIES 2

Cyber Elite
Cyber Elite

Basically you want to exclude traffic that comes from any of those 5 subnets?

 

(addr.src notin '172.0.0.0/8') and ( addr.src notin 10.0.0.0/8 )  and (addr.src notin '180.0.0.0/8') and ( addr.src notin 100.0.0.0/8 ) and ( addr.src notin 200.0.0.0/8 )

 

or

 

!((addr.src in '172.0.0.0/8') and ( addr.src in 10.0.0.0/8 )  and (addr.src in '180.0.0.0/8') and ( addr.src in 100.0.0.0/8 ) and ( addr.src in 200.0.0.0/8 ))

Enterprise Architect, Security @ Cloud Carib Ltd
Palo Alto Networks certified from 2011

Cyber Elite
Cyber Elite

the syntax will be AND for all the subnets

 

(notin A) AND (notin B) AND (notin C) AND (notin D)

 

you can only have 1 subnet per source field, so normally an 'AND' between 2 subnets would create no hits as you can't have both subnets in the same field, but the use of 'not' makes the 'and' an 'or' ("not and not" makes a boolean 'or')

 

 

(notin A) AND (notin B) AND (notin C) AND (notin D)

==

!((in A) OR (in B) OR (in C) OR (in D))

 

Tom Piens
PANgurus - Strata specialist; config reviews, policy optimization
  • 2 accepted solutions
  • 3914 Views
  • 2 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!