<?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: Question for lookup a large blacklist IP in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Question-for-lookup-a-large-blacklist-IP/m-p/517864#M145642</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225834"&gt;@kitkit321&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, you can use a single column lookup, like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| lookup blacklist.csv src_ip as ip OUTPUT ip as foundIp
| where !isnull(foundIp)&lt;/LI-CODE&gt;&lt;P&gt;so, the lookup will return the IP if found into the new field 'foundIp' and then you can test for not null on that new field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Sep 2020 06:35:57 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2020-09-04T06:35:57Z</dc:date>
    <item>
      <title>Question for lookup a large blacklist IP</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-for-lookup-a-large-blacklist-IP/m-p/517853#M145637</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;I encounter a question on setting up a blacklist ip use case.&lt;/P&gt;&lt;P&gt;I create a blacklist.csv which stored over 500,000 record and the format is like&lt;/P&gt;&lt;P&gt;BlacklistIP&lt;/P&gt;&lt;P&gt;x.x.x.x&lt;/P&gt;&lt;P&gt;abc.com&lt;/P&gt;&lt;P&gt;y.y.y.y&lt;/P&gt;&lt;P&gt;bcd.com&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use the following search&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;index=test dst_ip=* OR src_ip=* [ | inputlookup blacklist.csv | fields BlacklistIP | rename BlacklistIP as query]&lt;/P&gt;&lt;P&gt;however, I discovered that splunk is limited the subsearch to 10000 result.&lt;/P&gt;&lt;P&gt;If the 1.1.1.1 is in col 1000 and the&amp;nbsp;src_ip/dst_ip is 1.1.1.1, it appears in the search result.&lt;/P&gt;&lt;P&gt;If the 3.3.3.3 is in col 30000, even the&amp;nbsp;src_ip/dst_ip is 3.3.3.3, it is not appear in the search result.&lt;/P&gt;&lt;P&gt;If the 4.4.4.4 is in col 50000, even the&amp;nbsp;src_ip/dst_ip is 4.4.4.4, it is not appear in the search result.&lt;/P&gt;&lt;P&gt;After i change the subsearch limit in the limit.conf,&lt;/P&gt;&lt;P&gt;maxout = 1,000,000&lt;/P&gt;&lt;P&gt;maxtime = 240&lt;/P&gt;&lt;P&gt;ttl = 600&lt;/P&gt;&lt;P&gt;The result contain 3.3.3.3 but 4.4.4.4 is still not appear.&lt;/P&gt;&lt;P&gt;Also, the search is taking a long time, may be around 5 to 6 mins.&lt;/P&gt;&lt;P&gt;here is the hardware spec.&lt;/P&gt;&lt;P&gt;Splunk Enterprise Server&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="splunk-version"&gt;8.0.4&lt;/SPAN&gt; Linux, 7.64 GB Physical Memory, 8 CPU Cores &lt;SPAN class="do-i18n"&gt;Mode: Standalone&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Is there any suggestion for me? Thank you for help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 05:07:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-for-lookup-a-large-blacklist-IP/m-p/517853#M145637</guid>
      <dc:creator>kitkit321</dc:creator>
      <dc:date>2020-09-04T05:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: Question for lookup a large blacklist IP</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-for-lookup-a-large-blacklist-IP/m-p/517856#M145639</link>
      <description>&lt;P&gt;You are using the contents of the lookup as search criteria. In the initial instance, you would be better off just searching all the data and then looking up the value in the blacklist and based on the result act accordingly&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=test dst_ip=* OR src_ip=* 
| lookup blacklist.csv ip as dst_ip OUTPUT domain
| lookup blacklist.csv ip as src_ip OUTPUTNEW domain
| where !isnull(domain)&lt;/LI-CODE&gt;&lt;P&gt;where your lookup is&lt;/P&gt;&lt;P&gt;ip,name&lt;/P&gt;&lt;P&gt;1.1.1.1,abc.com&lt;/P&gt;&lt;P&gt;However, CSV lookups are not very efficient, so you should think about a KV store. Also, you should think about using CIDR as a way to define IP ranges, where appropriate, so that you can limit your rows.&lt;/P&gt;&lt;P&gt;For that you would need to create a lookup definition on top of the CSV/KV store lookup data, as that is how it can do CIDR lookups&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 05:49:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-for-lookup-a-large-blacklist-IP/m-p/517856#M145639</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2020-09-04T05:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: Question for lookup a large blacklist IP</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-for-lookup-a-large-blacklist-IP/m-p/517859#M145641</link>
      <description>&lt;P&gt;However, the csv is one contain 1 column, it is just like&lt;/P&gt;&lt;P&gt;ip&lt;/P&gt;&lt;P&gt;1.1.1.1&lt;/P&gt;&lt;P&gt;2.2.2.2&lt;/P&gt;&lt;P&gt;3.3.3.3&lt;/P&gt;&lt;P&gt;4.4.4.4.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since there is no 2 columns in the csv, i think i cannot use the lookup command.&lt;/P&gt;&lt;P&gt;In other word, how can i use dst_ip&amp;nbsp; or src_ip to search in the blacklist.csv?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 06:17:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-for-lookup-a-large-blacklist-IP/m-p/517859#M145641</guid>
      <dc:creator>kitkit321</dc:creator>
      <dc:date>2020-09-04T06:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: Question for lookup a large blacklist IP</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-for-lookup-a-large-blacklist-IP/m-p/517864#M145642</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225834"&gt;@kitkit321&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, you can use a single column lookup, like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| lookup blacklist.csv src_ip as ip OUTPUT ip as foundIp
| where !isnull(foundIp)&lt;/LI-CODE&gt;&lt;P&gt;so, the lookup will return the IP if found into the new field 'foundIp' and then you can test for not null on that new field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 06:35:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-for-lookup-a-large-blacklist-IP/m-p/517864#M145642</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2020-09-04T06:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: Question for lookup a large blacklist IP</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-for-lookup-a-large-blacklist-IP/m-p/517875#M145644</link>
      <description>&lt;P&gt;index=test dst_ip=* OR src_ip=*&lt;BR /&gt;| lookup blacklist.csv src_ip as ip OUTPUT ip as foundIp&lt;BR /&gt;| where !isnull(foundIp)&lt;/P&gt;&lt;P&gt;After i perform the search, the error message is&lt;BR /&gt;&lt;SPAN&gt;Error in 'lookup' command: Could not find all of the specified lookup fields in the lookup table.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 07:18:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-for-lookup-a-large-blacklist-IP/m-p/517875#M145644</guid>
      <dc:creator>kitkit321</dc:creator>
      <dc:date>2020-09-04T07:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: Question for lookup a large blacklist IP</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-for-lookup-a-large-blacklist-IP/m-p/517885#M145645</link>
      <description>&lt;P&gt;if you are using lookup command look at splunk lookup property that lookup should have 2 fields at least to be qualified as lookup.&lt;/P&gt;&lt;P&gt;&lt;A href="https://youtu.be/E3-JaZEIXPw" target="_blank"&gt;https://youtu.be/E3-JaZEIXPw&lt;/A&gt;&lt;/P&gt;&lt;P&gt;add a new column let’s say flag and have value yes for all rows.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;index=test dst_ip=* OR src_ip=*&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| lookup blacklist.csv src_ip as ip OUTPUT flag as foundIp&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| where isnotnull(foundIp)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 08:05:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-for-lookup-a-large-blacklist-IP/m-p/517885#M145645</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2020-09-04T08:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Question for lookup a large blacklist IP</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-for-lookup-a-large-blacklist-IP/m-p/517903#M145653</link>
      <description>&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;If I don't use lookup, is there any suggestion to perform the blacklist?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 09:50:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-for-lookup-a-large-blacklist-IP/m-p/517903#M145653</guid>
      <dc:creator>kitkit321</dc:creator>
      <dc:date>2020-09-04T09:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: Question for lookup a large blacklist IP</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-for-lookup-a-large-blacklist-IP/m-p/518128#M145720</link>
      <description>&lt;P&gt;Argh, my bad - the syntax is the wrong way round, should have been&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| lookup blacklist.csv ip as src_ip OUTPUT ip as foundIp&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Sep 2020 22:43:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-for-lookup-a-large-blacklist-IP/m-p/518128#M145720</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2020-09-06T22:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: Question for lookup a large blacklist IP</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-for-lookup-a-large-blacklist-IP/m-p/518137#M145726</link>
      <description>&lt;P&gt;Thank you for your help! the problem is solved.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2020 01:44:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-for-lookup-a-large-blacklist-IP/m-p/518137#M145726</guid>
      <dc:creator>kitkit321</dc:creator>
      <dc:date>2020-09-07T01:44:42Z</dc:date>
    </item>
  </channel>
</rss>

