<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#0050d0">
    That might work, but what the order of operations is on boolean
    operations (and/or) is, is unclear. In situations like that its
    always best to explicitly force the order yourself.<br>
    <br>
    filter f_firewall {<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; not (<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; program ("firewall" flags(ignore-case))<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; and (<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; message("192\.168\.")<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; or message("169\.254\.")<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; )<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; );<br>
    };<br>
    <br>
    <br>
    <br>
    Sent: Tue Nov 08 2011 11:46:35 GMT-0700 (MST)<br>
    From: Lay, James <a class="moz-txt-link-rfc2396E" href="mailto:james.lay@wincofoods.com">&lt;james.lay@wincofoods.com&gt;</a><br>
    To: Patrick H. <a class="moz-txt-link-rfc2396E" href="mailto:syslogng@feystorm.net">&lt;syslogng@feystorm.net&gt;</a>, Syslog-ng users' and
    developers' mailing list <a class="moz-txt-link-rfc2396E" href="mailto:syslog-ng@lists.balabit.hu">&lt;syslog-ng@lists.balabit.hu&gt;</a> <br>
    Subject: Re: [syslog-ng] Quick filter question
    <blockquote
cite="mid:360E0F1A6850C74D89B37C3A22C9DE1F04DB422A@GOMAIL.go.winco.local"
      type="cite">
      <pre wrap="">Ah...so I need or then yes?

filter f_firewall {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; not (
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; program ("firewall" flags(ignore-case))
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and message("192\.168\.")
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; or message("169\.254\.")
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; );
};

How's that look?

James

P.S. And thank you :)

James

From: Patrick H. [<a class="moz-txt-link-freetext" href="mailto:syslogng@feystorm.net">mailto:syslogng@feystorm.net</a>] 
Sent: Tuesday, November 08, 2011 11:40 AM
To: Syslog-ng users' and developers' mailing list
Cc: Lay, James
Subject: Re: [syslog-ng] Quick filter question

I'm not sure if semicolons are valid in filter rules, but technically valid or not, they shouldnt be there so try removing them.
The filter should look like
filter f_firewall {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; not (
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; program ("firewall" flags(ignore-case))
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and message("192\.168\.")
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and message("169\.254\.")
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; );
};

Note though, that filter will only trigger if both 192.168. and 169.254. are in the same log entry. Unless that IP address you masked out with "x"s is 169.254 it wont trigger.



Sent: Tue Nov 08 2011 11:21:11 GMT-0700 (MST)
From: Lay, James <a class="moz-txt-link-rfc2396E" href="mailto:james.lay@wincofoods.com">&lt;james.lay@wincofoods.com&gt;</a>
To: Syslog-ng users' and developers' mailing list <a class="moz-txt-link-rfc2396E" href="mailto:syslog-ng@lists.balabit.hu">&lt;syslog-ng@lists.balabit.hu&gt;</a> 
Subject: Re: [syslog-ng] Quick filter question 
Hey again all.
&nbsp;
So...I'm still having issue with this..not sure why.&nbsp; Here's the raw log:
&nbsp;
Nov&nbsp; 8 11:13:38 x.x.x.x firewall: Deny tcp 20 125 x.x.x.x 192.168.0.15 9517 17777 offset 7 S 3371425811 win 64 
&nbsp;
And from my syslog-ng.conf
&nbsp;
filter f_firewall {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; not (
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; program ("firewall" flags(ignore-case));
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and message("192\.168\.");
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and message("169\.254\.");
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )
};
&nbsp;
log {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; source(s_local);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; filter(f_dumb);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;filter(f_firewall);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; destination(d_file);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; destination(other);
};
&nbsp;
Any hints as to why these aren't matching?&nbsp; Should I not be \ing the periods?&nbsp; Thanks all.
&nbsp;
James
&nbsp;
From: <a class="moz-txt-link-abbreviated" href="mailto:syslog-ng-bounces@lists.balabit.hu">syslog-ng-bounces@lists.balabit.hu</a> [<a class="moz-txt-link-freetext" href="mailto:syslog-ng-bounces@lists.balabit.hu">mailto:syslog-ng-bounces@lists.balabit.hu</a>] On Behalf Of Frank Collette
Sent: Tuesday, November 08, 2011 8:36 AM
To: Syslog-ng users' and developers' mailing list
Subject: Re: [syslog-ng] Quick filter question
&nbsp;

filter f_firewall { 
&nbsp; &nbsp; &nbsp; &nbsp; not ( 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;program("firewall" flags(ignore-case)) and 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;message("169\.254\.[0-9]+\.[0-9]+" value("MESSAGE")); 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ) 
}; 


Thanks, 

Frank E. Collette IV 
Technical Services
Systems Administrator II
Trustmark National Bank
Office: 601-208-7517 
Fax: 601-208-6105 
<a class="moz-txt-link-abbreviated" href="mailto:fcollette@trustmark.com">fcollette@trustmark.com</a> 



From: &nbsp; &nbsp; &nbsp; &nbsp;"Lay, James" <a class="moz-txt-link-rfc2396E" href="mailto:james.lay@wincofoods.com">&lt;james.lay@wincofoods.com&gt;</a> 
To: &nbsp; &nbsp; &nbsp; &nbsp;<a class="moz-txt-link-rfc2396E" href="mailto:syslog-ng@lists.balabit.hu">&lt;syslog-ng@lists.balabit.hu&gt;</a> 
Date: &nbsp; &nbsp; &nbsp; &nbsp;11/08/2011 09:14 AM 
Subject: &nbsp; &nbsp; &nbsp; &nbsp;[syslog-ng] Quick filter question 
Sent by: &nbsp; &nbsp; &nbsp; &nbsp;<a class="moz-txt-link-abbreviated" href="mailto:syslog-ng-bounces@lists.balabit.hu">syslog-ng-bounces@lists.balabit.hu</a> 
________________________________________



Hey all! 
&nbsp; 
Real quick...trying to filter OUT firewall hits that have say...169.254. &nbsp;Will this do the trick? 
&nbsp; 
filter f_firewall { 
&nbsp; &nbsp; &nbsp; &nbsp; not program (firewall flags(ignore-case)); 
&nbsp; &nbsp; &nbsp; &nbsp; and not message("169\.254\.[0-9]+\.[0-9]+"); 
}; 
&nbsp; 
Thanks all. 
&nbsp; 
James______________________________________________________________________________
Member info: <a class="moz-txt-link-freetext" href="https://lists.balabit.hu/mailman/listinfo/syslog-ng">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a>
Documentation: <a class="moz-txt-link-freetext" href="http://www.balabit.com/support/documentation/?product=syslog-ng">http://www.balabit.com/support/documentation/?product=syslog-ng</a>
FAQ: <a class="moz-txt-link-freetext" href="http://www.balabit.com/wiki/syslog-ng-faq">http://www.balabit.com/wiki/syslog-ng-faq</a>





______________________________________________________________________________
Member info: <a class="moz-txt-link-freetext" href="https://lists.balabit.hu/mailman/listinfo/syslog-ng">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a>
Documentation: <a class="moz-txt-link-freetext" href="http://www.balabit.com/support/documentation/?product=syslog-ng">http://www.balabit.com/support/documentation/?product=syslog-ng</a>
FAQ: <a class="moz-txt-link-freetext" href="http://www.balabit.com/wiki/syslog-ng-faq">http://www.balabit.com/wiki/syslog-ng-faq</a>

</pre>
    </blockquote>
  </body>
</html>