<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic whitelist match issues in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/whitelist-match-issues/m-p/283793#M190651</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;

&lt;P&gt;I am having an issue where a logical AND NOT isn't working properly. Simply put I have an alert for mail servers that should be whitelisting a single IP's communication with either one of two IPs. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* tag=network NOT (src_ip=10.100.90.34 AND dest_ip=10.100.1.1) NOT(src_ip=10.100.90.34 AND dest_ip=10.100.1.2) (dest_port=25 OR dest_port=465 OR dest_port=2525 OR dest_port=110 OR dest_port=995 OR dest_port=143 OR dest_port=993) NOT
    [
    | inputlookup Inventory 
    | eval category=split(asset_category, "|") 
    | search category="Email" OR category="Mail" 
    | return 100 $asset_ip ] 
| eval is_local=`local_ip_list(src)` 
| where is_local=1 
| stats earliest(_time) as Timestamp, values(dest) as "Destination IP", values(app) as Application, values(dest_port) as Port, values(user) as Username, earliest(_raw) as "Raw Log", count by src 
| convert ctime(Timestamp) 
| rename count as Correlated src as "Source IP" 
| search Correlated &amp;gt;29
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My issue is that the alert is firing for communication between 10.100.90.34 and 10.100.1.1 or 10.100.1.2, IP A,B and C respectively. I've tried &lt;BR /&gt;
&lt;CODE&gt;NOT(A (B OR C))&lt;/CODE&gt; &lt;BR /&gt;
Also:&lt;BR /&gt;
&lt;CODE&gt;NOT(A B) NOT(A C)&lt;/CODE&gt;&lt;BR /&gt;
Based on both logical expressions the results should not include communication between those 2 devices. &lt;BR /&gt;
&lt;STRONG&gt;Note:&lt;/STRONG&gt; I am unable to modify the inventory lookup table, &lt;EM&gt;and&lt;/EM&gt;, I have tried the search without the sub-search with the same result, except of course having my lookup table results included in the alert.&lt;/P&gt;

&lt;P&gt;Thanks for taking the time to read this.&lt;/P&gt;</description>
    <pubDate>Tue, 26 Jul 2016 20:55:10 GMT</pubDate>
    <dc:creator>alaking</dc:creator>
    <dc:date>2016-07-26T20:55:10Z</dc:date>
    <item>
      <title>whitelist match issues</title>
      <link>https://community.splunk.com/t5/Splunk-Search/whitelist-match-issues/m-p/283793#M190651</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;

&lt;P&gt;I am having an issue where a logical AND NOT isn't working properly. Simply put I have an alert for mail servers that should be whitelisting a single IP's communication with either one of two IPs. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* tag=network NOT (src_ip=10.100.90.34 AND dest_ip=10.100.1.1) NOT(src_ip=10.100.90.34 AND dest_ip=10.100.1.2) (dest_port=25 OR dest_port=465 OR dest_port=2525 OR dest_port=110 OR dest_port=995 OR dest_port=143 OR dest_port=993) NOT
    [
    | inputlookup Inventory 
    | eval category=split(asset_category, "|") 
    | search category="Email" OR category="Mail" 
    | return 100 $asset_ip ] 
| eval is_local=`local_ip_list(src)` 
| where is_local=1 
| stats earliest(_time) as Timestamp, values(dest) as "Destination IP", values(app) as Application, values(dest_port) as Port, values(user) as Username, earliest(_raw) as "Raw Log", count by src 
| convert ctime(Timestamp) 
| rename count as Correlated src as "Source IP" 
| search Correlated &amp;gt;29
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My issue is that the alert is firing for communication between 10.100.90.34 and 10.100.1.1 or 10.100.1.2, IP A,B and C respectively. I've tried &lt;BR /&gt;
&lt;CODE&gt;NOT(A (B OR C))&lt;/CODE&gt; &lt;BR /&gt;
Also:&lt;BR /&gt;
&lt;CODE&gt;NOT(A B) NOT(A C)&lt;/CODE&gt;&lt;BR /&gt;
Based on both logical expressions the results should not include communication between those 2 devices. &lt;BR /&gt;
&lt;STRONG&gt;Note:&lt;/STRONG&gt; I am unable to modify the inventory lookup table, &lt;EM&gt;and&lt;/EM&gt;, I have tried the search without the sub-search with the same result, except of course having my lookup table results included in the alert.&lt;/P&gt;

&lt;P&gt;Thanks for taking the time to read this.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 20:55:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/whitelist-match-issues/m-p/283793#M190651</guid>
      <dc:creator>alaking</dc:creator>
      <dc:date>2016-07-26T20:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: whitelist match issues</title>
      <link>https://community.splunk.com/t5/Splunk-Search/whitelist-match-issues/m-p/283794#M190652</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* tag=network NOT ((src_ip=10.100.90.34 AND dest_ip=10.100.1.1) OR (src_ip=10.100.90.34 AND dest_ip=10.100.1.2) )(dest_port=25 OR dest_port=465 OR dest_port=2525 OR dest_port=110 OR dest_port=995 OR dest_port=143 OR dest_port=993) NOT
     [
     | inputlookup Inventory 
     | eval category=split(asset_category, "|") 
     | search category="Email" OR category="Mail" 
     | return 100 $asset_ip ] 
 | eval is_local=`local_ip_list(src)` 
 | where is_local=1 
 | stats earliest(_time) as Timestamp, values(dest) as "Destination IP", values(app) as Application, values(dest_port) as Port, values(user) as Username, earliest(_raw) as "Raw Log", count by src 
 | convert ctime(Timestamp) 
 | rename count as Correlated src as "Source IP" 
 | search Correlated &amp;gt;29
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Jul 2016 22:57:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/whitelist-match-issues/m-p/283794#M190652</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-07-26T22:57:58Z</dc:date>
    </item>
  </channel>
</rss>

