<?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 How do I edit my search to compare a list of IPs from a lookup to IPs in firewall logs? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-search-to-compare-a-list-of-IPs-from-a-lookup/m-p/213692#M62686</link>
    <description>&lt;P&gt;I'm still new to Splunk and trying to figure out the correct syntax for lookups.&lt;/P&gt;

&lt;P&gt;My goal is to compare a list of known IPs associated with a botnet and see if there is any traffic to/from the IPs in the firewall logs.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=firewall_logs sourcetype=cisco:asa [ | inputlookup bad_ips.csv | fields IP ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This returns nothing. What else am I missing? Thanks in advance!&lt;/P&gt;</description>
    <pubDate>Wed, 04 Nov 2015 22:45:41 GMT</pubDate>
    <dc:creator>CYBR_AH</dc:creator>
    <dc:date>2015-11-04T22:45:41Z</dc:date>
    <item>
      <title>How do I edit my search to compare a list of IPs from a lookup to IPs in firewall logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-search-to-compare-a-list-of-IPs-from-a-lookup/m-p/213692#M62686</link>
      <description>&lt;P&gt;I'm still new to Splunk and trying to figure out the correct syntax for lookups.&lt;/P&gt;

&lt;P&gt;My goal is to compare a list of known IPs associated with a botnet and see if there is any traffic to/from the IPs in the firewall logs.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=firewall_logs sourcetype=cisco:asa [ | inputlookup bad_ips.csv | fields IP ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This returns nothing. What else am I missing? Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2015 22:45:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-search-to-compare-a-list-of-IPs-from-a-lookup/m-p/213692#M62686</guid>
      <dc:creator>CYBR_AH</dc:creator>
      <dc:date>2015-11-04T22:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my search to compare a list of IPs from a lookup to IPs in firewall logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-search-to-compare-a-list-of-IPs-from-a-lookup/m-p/213693#M62687</link>
      <description>&lt;P&gt;Hi CYBR_AH,&lt;/P&gt;

&lt;P&gt;run the search using &lt;CODE&gt;return&lt;/CODE&gt; instead &lt;CODE&gt;fields&lt;/CODE&gt; :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=firewall_logs sourcetype=cisco:asa | [ | inputlookup bad_ips.csv | return 999 IP ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will return the results from the lookup file as this string:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(IP="1.1.1.1") OR (IP="2.2.2.2") ....
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;which will be used in the base search, so the search be in the end:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=firewall_logs sourcetype=cisco:asa (IP="1.1.1.1") OR (IP="2.2.2.2") ....
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Read the docs on &lt;CODE&gt;return&lt;/CODE&gt; to learn more details &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.3.0/SearchReference/Return"&gt;http://docs.splunk.com/Documentation/Splunk/6.3.0/SearchReference/Return&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Update:&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Sorry the first one was wrong! Try this instead:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | inputlookup bad_ips.csv | search [ search index=firewall_logs sourcetype=cisco:asa | dedup IP | fields IP ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this makes more sense ...&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2015 23:24:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-search-to-compare-a-list-of-IPs-from-a-lookup/m-p/213693#M62687</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-11-04T23:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my search to compare a list of IPs from a lookup to IPs in firewall logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-search-to-compare-a-list-of-IPs-from-a-lookup/m-p/213694#M62688</link>
      <description>&lt;P&gt;update ping...&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2015 23:34:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-search-to-compare-a-list-of-IPs-from-a-lookup/m-p/213694#M62688</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-11-04T23:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my search to compare a list of IPs from a lookup to IPs in firewall logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-search-to-compare-a-list-of-IPs-from-a-lookup/m-p/213695#M62689</link>
      <description>&lt;P&gt;I tried &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=firewall_logs sourcetype=cisco:asa | [ | inputlookup bad_ips.csv | return 999 $IP] | stats count by dest_ip
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and it worked. This gave me a really good starting point. Thanks for your help! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2015 04:35:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-search-to-compare-a-list-of-IPs-from-a-lookup/m-p/213695#M62689</guid>
      <dc:creator>CYBR_AH</dc:creator>
      <dc:date>2015-11-05T04:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my search to compare a list of IPs from a lookup to IPs in firewall logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-search-to-compare-a-list-of-IPs-from-a-lookup/m-p/213696#M62690</link>
      <description>&lt;P&gt;where do ve upload .csv file in splunk which contains list of IPs?&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2019 12:36:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-search-to-compare-a-list-of-IPs-from-a-lookup/m-p/213696#M62690</guid>
      <dc:creator>vinitashinde94</dc:creator>
      <dc:date>2019-07-25T12:36:32Z</dc:date>
    </item>
  </channel>
</rss>

