Snort mailing list archives

Re: Question about negated and non-negated variables in rules


From: Matt Kettler <mkettler () evi-inc com>
Date: Fri, 28 Nov 2003 14:12:56 -0500

At 08:49 AM 11/27/2003, J-H. Johansen wrote:
I'm working on some ICMP rules and was wondering
Recently I added a variable which contains our homenet with exclusions:

var NOT_ICMP_SERVERS [$HOME_NET,!xxx.xxx.xx.xxx/32,!xxx.xx.xx.xx/32]

This failed while running a check so I've also tried:


Any clues as to how this must be done ?


All of the above rules are logically equivalent to "any".

what you really want is:

var NOT_ICMP_SERVERS ![$HOME_NET,xxx.xxx.xx.xxx/32,xxx.xx.xx.xx/32]


ie: Not (a or b or c) instead of (not a) or (not b) or (not c).


Work through the boolean math... c matches (not a) as well as (not b). Thus everything, including a, b and c, will match the second version.



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Snort-users mailing list
Snort-users () lists sourceforge net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://www.geocrawler.com/redir-sf.php3?list=snort-users


Current thread: