<?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 Re: tstats search not filtering out local IP ranges in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-are-tstats-search-not-filtering-out-local-IP-ranges/m-p/634509#M220440</link>
    <description>&lt;P&gt;Thank you. Those limitations are interesting. I am surprised I have not noticed this issue before.&lt;/P&gt;</description>
    <pubDate>Wed, 15 Mar 2023 05:24:32 GMT</pubDate>
    <dc:creator>dmbrcx</dc:creator>
    <dc:date>2023-03-15T05:24:32Z</dc:date>
    <item>
      <title>Why are tstats search not filtering out local IP ranges?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-are-tstats-search-not-filtering-out-local-IP-ranges/m-p/634501#M220434</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am using tstats to search the Network Datamodel for outbound SMB traffic (port 445) to external IP address ranges.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Why are local IP ranges still appearing in my search results?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Here is my syntax:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| tstats summariesonly=t fillnull_value="MISSING" count from datamodel=Network_Traffic.All_Traffic where All_Traffic.dest_port="445" AND NOT All_Traffic.dest IN ("10.0.0.0/8","172.16.0.0/16","192.168.0.0/24") earliest=-15m latest=now
by _time, All_Traffic.dest, All_Traffic.dest_port,All_Traffic.src, All_Traffic.src_port, All_Traffic.action, All_Traffic.bytes, index, sourcetype&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Screenshot:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Splunk Forum Question 2023-03-15_15-01.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24307iB5E9F2823339DC53/image-size/large?v=v2&amp;amp;px=999" role="button" title="Splunk Forum Question 2023-03-15_15-01.png" alt="Splunk Forum Question 2023-03-15_15-01.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I believe I have filtered them correctly, but hmm...&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 18:31:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-are-tstats-search-not-filtering-out-local-IP-ranges/m-p/634501#M220434</guid>
      <dc:creator>dmbrcx</dc:creator>
      <dc:date>2023-03-15T18:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: tstats search not filtering out local IP ranges</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-are-tstats-search-not-filtering-out-local-IP-ranges/m-p/634503#M220435</link>
      <description>&lt;P&gt;Two things. &amp;nbsp;First, CIDR match doesn't go with the IN operator. &amp;nbsp;You have to specify them individually, like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats summariesonly=t fillnull_value="MISSING" count from datamodel=Network_Traffic.All_Traffic where All_Traffic.dest_port="445"
 AND NOT (All_Traffic.dest="10.0.0.0/8" OR All_Traffic.dest="172.16.0.0/16" OR All_Traffic.dest="192.168.0.0/24")
 earliest=-15m latest=now
by _time, All_Traffic.dest, All_Traffic.dest_port,All_Traffic.src, All_Traffic.src_port, All_Traffic.action, All_Traffic.bytes, index, sourcetype&lt;/LI-CODE&gt;&lt;P&gt;Second, beware of &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Tstats#Limitations_of_CIDR_matching_with_tstats" target="_blank" rel="noopener"&gt;Limitations of CIDR matching with tstats&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 04:46:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-are-tstats-search-not-filtering-out-local-IP-ranges/m-p/634503#M220435</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-03-15T04:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: tstats search not filtering out local IP ranges</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-are-tstats-search-not-filtering-out-local-IP-ranges/m-p/634509#M220440</link>
      <description>&lt;P&gt;Thank you. Those limitations are interesting. I am surprised I have not noticed this issue before.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 05:24:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-are-tstats-search-not-filtering-out-local-IP-ranges/m-p/634509#M220440</guid>
      <dc:creator>dmbrcx</dc:creator>
      <dc:date>2023-03-15T05:24:32Z</dc:date>
    </item>
  </channel>
</rss>

