<?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: exclude IPs from results in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/exclude-IPs-from-results/m-p/82851#M21040</link>
    <description>&lt;P&gt;Thank you so much!! I solved it!!&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jul 2013 01:25:25 GMT</pubDate>
    <dc:creator>hylee</dc:creator>
    <dc:date>2013-07-04T01:25:25Z</dc:date>
    <item>
      <title>exclude IPs from results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/exclude-IPs-from-results/m-p/82848#M21037</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I want to exclude some IP addresses which are about over 100 in my search.&lt;BR /&gt;
Seems silly to type NOT NOT NOT.. 100+ times. &lt;/P&gt;

&lt;P&gt;source="dbmon-tail://netmanias/splunk_ads_click" NOT "61.247.204.36" NOT "61.247.204.38" NOT "61.247.204.37" NOT "61.247.204.39" NOT "61.247.204.35......"&lt;/P&gt;

&lt;P&gt;Is there any good idea?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:14:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/exclude-IPs-from-results/m-p/82848#M21037</guid>
      <dc:creator>hylee</dc:creator>
      <dc:date>2020-09-28T14:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: exclude IPs from results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/exclude-IPs-from-results/m-p/82849#M21038</link>
      <description>&lt;P&gt;yes! use a combination of a lookup file and a subsearch.&lt;/P&gt;

&lt;P&gt;Put all your IP addresses into CSV file, called "ipAdd.csv" for example with the following contents:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;match,ip
1,61.247.204.36
1,61.247.204.38
1,61.247.204.37
1,61.247.204.39
1,61.247.204.35
....
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Create a &lt;CODE&gt;transforms.conf&lt;/CODE&gt; file with the following stanza:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[ipAdd]
filename = ipAdd.csv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Check that Splunk likes this configuration/format by putting the following into a search box (note that the "&lt;CODE&gt;|&lt;/CODE&gt;" should be the first character):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup ipAdd
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Assuming this returns the contents of the file, you can construct your search as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="dbmon-tail://netmanias/splunk_ads_click" NOT [|inputlookup ipAdd | rename ip AS query | fields query]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Ref:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.3/Search/Aboutsubsearches"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.3/Search/Aboutsubsearches&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.3/Knowledge/Addfieldsfromexternaldatasources"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.3/Knowledge/Addfieldsfromexternaldatasources&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/4.3.4/User/HowSubsearchesWork"&gt;http://docs.splunk.com/Documentation/Splunk/4.3.4/User/HowSubsearchesWork&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Hope this helps,&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2013 08:17:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/exclude-IPs-from-results/m-p/82849#M21038</guid>
      <dc:creator>MHibbin</dc:creator>
      <dc:date>2013-07-03T08:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: exclude IPs from results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/exclude-IPs-from-results/m-p/82850#M21039</link>
      <description>&lt;P&gt;If the IP addresses are in a specific range you could use the CIDR notation like this:&lt;BR /&gt;
source="dbmon-tail://netmanias/splunk_ads_click" NOT 61.247.204.0/24 &lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:14:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/exclude-IPs-from-results/m-p/82850#M21039</guid>
      <dc:creator>peter_krammer</dc:creator>
      <dc:date>2020-09-28T14:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: exclude IPs from results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/exclude-IPs-from-results/m-p/82851#M21040</link>
      <description>&lt;P&gt;Thank you so much!! I solved it!!&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2013 01:25:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/exclude-IPs-from-results/m-p/82851#M21040</guid>
      <dc:creator>hylee</dc:creator>
      <dc:date>2013-07-04T01:25:25Z</dc:date>
    </item>
  </channel>
</rss>

