<?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: What is the correct syntax for excluding a subnet from a search using CIDR notation? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-correct-syntax-for-excluding-a-subnet-from-a-search/m-p/111172#M29124</link>
    <description>&lt;P&gt;Note that doing cidr matching on _raw won't work AFAIK. I believe you need a field to look at for CIDR matching&lt;/P&gt;</description>
    <pubDate>Thu, 11 Sep 2014 05:18:22 GMT</pubDate>
    <dc:creator>mikaelbje</dc:creator>
    <dc:date>2014-09-11T05:18:22Z</dc:date>
    <item>
      <title>What is the correct syntax for excluding a subnet from a search using CIDR notation?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-correct-syntax-for-excluding-a-subnet-from-a-search/m-p/111166#M29118</link>
      <description>&lt;P&gt;In trying to learn how to exclude a subnet from a search using CIDR notation, I was directed to this link:&lt;BR /&gt;
&lt;A href="http://answers.splunk.com/answers/130030/how-does-one-search-for-a-cidr-range-of-addresses"&gt;http://answers.splunk.com/answers/130030/how-does-one-search-for-a-cidr-range-of-addresses&lt;/A&gt;&lt;BR /&gt;
which says:&lt;BR /&gt;
You can't do CIDR defined search on freetext. You can however do it if you have the IP addresses you want to match against in extracted fields. In other words,&lt;/P&gt;

&lt;P&gt;10.0.0.0/24&lt;/P&gt;

&lt;P&gt;won't work, but&lt;/P&gt;

&lt;P&gt;src_ip=10.0.0.0/24&lt;/P&gt;

&lt;P&gt;will.&lt;/P&gt;

&lt;P&gt;I have a search like this:&lt;BR /&gt;
"%ASA-4-733100" OR "%ASA-4-733104" OR "%ASA-4-733105" NOT "[ Scanning]" NOT "[           DNS   53]" NOT "[    Port-8191-65535]" NOT "[  NetBIOS-Name  137]"&lt;/P&gt;

&lt;P&gt;and I want to exclude the subnet 192.168.0.0/16 (within the fields "_raw" and "host") from the results.  How do I do this?  What is the correct syntax for the entire search? &lt;/P&gt;</description>
      <pubDate>Thu, 04 Sep 2014 12:59:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-correct-syntax-for-excluding-a-subnet-from-a-search/m-p/111166#M29118</guid>
      <dc:creator>jlawsonmers</dc:creator>
      <dc:date>2014-09-04T12:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: What is the correct syntax for excluding a subnet from a search using CIDR notation?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-correct-syntax-for-excluding-a-subnet-from-a-search/m-p/111167#M29119</link>
      <description>&lt;P&gt;Hi! Take a look at the cisco_ios app for an example on how to do this. The view in question is called security_acl. It does a lookup on the cisco_ios_excluded_ips.csv file. Check transforms.conf in the app for the stanza referencing the lookup file. There's also lots of extractions for src_ip in there as well that you can have a look at.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Sep 2014 16:36:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-correct-syntax-for-excluding-a-subnet-from-a-search/m-p/111167#M29119</guid>
      <dc:creator>mikaelbje</dc:creator>
      <dc:date>2014-09-04T16:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: What is the correct syntax for excluding a subnet from a search using CIDR notation?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-correct-syntax-for-excluding-a-subnet-from-a-search/m-p/111168#M29120</link>
      <description>&lt;P&gt;Here's the link to the app's page &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;A href="http://apps.splunk.com/app/1352/"&gt;http://apps.splunk.com/app/1352/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Sep 2014 00:49:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-correct-syntax-for-excluding-a-subnet-from-a-search/m-p/111168#M29120</guid>
      <dc:creator>ppablo</dc:creator>
      <dc:date>2014-09-05T00:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: What is the correct syntax for excluding a subnet from a search using CIDR notation?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-correct-syntax-for-excluding-a-subnet-from-a-search/m-p/111169#M29121</link>
      <description>&lt;P&gt;The CSV file:&lt;/P&gt;

&lt;PRE&gt;
src_ip
127.0.0.1
192.168.200.0/24
&lt;/PRE&gt;

&lt;P&gt;Order matters AFAIK.&lt;/P&gt;

&lt;P&gt;Transforms.conf:&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;
[excluded_ips]&lt;BR /&gt;
filename = excluded_ips.csv&lt;BR /&gt;
match_type = CIDR(src_ip)&lt;BR /&gt;
&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;Your search:&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;
"%ASA-4-733100" OR "%ASA-4-733104" OR "%ASA-4-733105" NOT "[ Scanning]" NOT "[ DNS 53]" NOT "[ Port-8191-65535]" NOT "[ NetBIOS-Name 137]" NOT [inputlookup excluded_ips | fields src_ip]&lt;BR /&gt;
&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;Another example can be found here: &lt;A href="http://answers.splunk.com/answers/93779/match_type-cidr-doesnt-seem-to-work" target="_blank"&gt;http://answers.splunk.com/answers/93779/match_type-cidr-doesnt-seem-to-work&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:29:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-correct-syntax-for-excluding-a-subnet-from-a-search/m-p/111169#M29121</guid>
      <dc:creator>mikaelbje</dc:creator>
      <dc:date>2020-09-28T17:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: What is the correct syntax for excluding a subnet from a search using CIDR notation?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-correct-syntax-for-excluding-a-subnet-from-a-search/m-p/111170#M29122</link>
      <description>&lt;P&gt;Thanks, that seems helpful.  Would someone tell me where to find the security_acl view and transforms.conf?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Sep 2014 18:40:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-correct-syntax-for-excluding-a-subnet-from-a-search/m-p/111170#M29122</guid>
      <dc:creator>jlawsonmers</dc:creator>
      <dc:date>2014-09-10T18:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: What is the correct syntax for excluding a subnet from a search using CIDR notation?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-correct-syntax-for-excluding-a-subnet-from-a-search/m-p/111171#M29123</link>
      <description>&lt;P&gt;security_acl.xml : &lt;A href="https://github.com/inspired/cisco_ios/blob/master/default/data/ui/views/security_acl.xml" target="_blank"&gt;https://github.com/inspired/cisco_ios/blob/master/default/data/ui/views/security_acl.xml&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Transforms.conf : &lt;BR /&gt;
&lt;A href="https://github.com/inspired/TA-cisco_ios/blob/master/default/transforms.conf" target="_blank"&gt;https://github.com/inspired/TA-cisco_ios/blob/master/default/transforms.conf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Have a look at my other answer which should be a working solution&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:33:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-correct-syntax-for-excluding-a-subnet-from-a-search/m-p/111171#M29123</guid>
      <dc:creator>mikaelbje</dc:creator>
      <dc:date>2020-09-28T17:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: What is the correct syntax for excluding a subnet from a search using CIDR notation?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-correct-syntax-for-excluding-a-subnet-from-a-search/m-p/111172#M29124</link>
      <description>&lt;P&gt;Note that doing cidr matching on _raw won't work AFAIK. I believe you need a field to look at for CIDR matching&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2014 05:18:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-correct-syntax-for-excluding-a-subnet-from-a-search/m-p/111172#M29124</guid>
      <dc:creator>mikaelbje</dc:creator>
      <dc:date>2014-09-11T05:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: What is the correct syntax for excluding a subnet from a search using CIDR notation?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-correct-syntax-for-excluding-a-subnet-from-a-search/m-p/111173#M29125</link>
      <description>&lt;P&gt;In order to make this work, where should the file "excluded_ips.csv" be placed and where should the file  "transforms.conf" be placed?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Sep 2014 18:38:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-correct-syntax-for-excluding-a-subnet-from-a-search/m-p/111173#M29125</guid>
      <dc:creator>jlawsonmers</dc:creator>
      <dc:date>2014-09-17T18:38:43Z</dc:date>
    </item>
  </channel>
</rss>

