<?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: How to setup a search where we look for single source IP's hitting multiple destination IP's on our firewall in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-search-where-we-look-for-single-source-IP-s/m-p/590975#M205745</link>
    <description>&lt;P&gt;In my pseudo code,&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats ... dc(dest_ip) as dest_count by src_ip ...
...
| rename ... dest_count as "Target Count"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;gives the number of dest_ip per src_ip. &amp;nbsp;The code should only list up to 10 in "Sample Target IP" field. &amp;nbsp;If you don't need the sampling, just remove codes related to values(dest_ip).&lt;/P&gt;</description>
    <pubDate>Sun, 27 Mar 2022 00:25:22 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2022-03-27T00:25:22Z</dc:date>
    <item>
      <title>How to setup a search where we look for single source IP's hitting multiple destination IP's on our firewall?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-search-where-we-look-for-single-source-IP-s/m-p/590946#M205727</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am trying to setup a search where we look for single source IP's hitting multiple destination IP's on our firewall.&lt;/P&gt;
&lt;P&gt;1. When I do a search, I get TONS of results for destinations, but I want to limit the destination results to only show a few sample set.&lt;/P&gt;
&lt;P&gt;2. I also have results showing up which only show one destination IP, which we do not want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The search I am using as an example is&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;index=pan_logs eventtype=pan_traffic dvc="FD0*.*" action=allow OR action=allowed OR action=alert app=sip OR dest_port=5060 OR dest_port=5061 AND src_ip!=10.0.0.0/8 AND src_ip!=172.16.0.0/12 AND src_ip!=192.168.0.0/16&amp;nbsp; | stats values(rule) values(dest_ip) values(dest_port) count by src_ip vendor_action app dvc vsys | sort bt count desc limit=10 | sort dest_ip | where count &amp;gt; 500 | fields src_ip dvc vsys values(rule) app values(dest_ip) values(dest_port) vendor_action count | rename src_ip AS "Source IP", vendor_action AS "Action", values(rule) AS "Firewall Rule", values(dest_ip) AS "Target IP", values(dest_port) AS "Destination Port", count AS "Total Count", dvc AS "Device", app AS "Application" | head 20&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example search result&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.jpg" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18785iF4F0235B7E4C1BE9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.jpg" alt="Untitled.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 21:19:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-search-where-we-look-for-single-source-IP-s/m-p/590946#M205727</guid>
      <dc:creator>elijahputz</dc:creator>
      <dc:date>2022-03-28T21:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup a search where we look for single source IP's hitting multiple destination IP's on our firewall</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-search-where-we-look-for-single-source-IP-s/m-p/590950#M205730</link>
      <description>&lt;P&gt;On the second point, &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.5/SearchReference/Aggregatefunctions#distinct_count.28X.29_or_dc.28X.29" target="_blank" rel="noopener"&gt;dc(dest_ip)&lt;/A&gt;&amp;nbsp;will allow you to only look at multiple-destination events. (The following example looks at 5+ destinations. &amp;nbsp;On the first, combine&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/MultivalueEvalFunctions#mvcount.28MVFIELD.29" target="_blank" rel="noopener"&gt;mvcount&lt;/A&gt;,&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/MultivalueEvalFunctions#mvmap.28X.2CY.29" target="_blank" rel="noopener"&gt;mvmap&lt;/A&gt;, and&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/MultivalueEvalFunctions#mvindex.28MVFIELD.2CSTARTINDEX.2C_ENDINDEX.29" target="_blank" rel="noopener"&gt;mvindex&lt;/A&gt;. (The following example samples up to 10 destinations.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=pan_logs eventtype=pan_traffic dvc="FD0*.*" action=allow OR action=allowed OR action=alert app=sip OR dest_port=5060 OR dest_port=5061 AND src_ip!=10.0.0.0/8 AND src_ip!=172.16.0.0/12 AND src_ip!=192.168.0.0/16
| stats  values(rule) AS "Firewall Rule" values(dest_ip) AS dest_ip values(dest_port) AS "Destination Port" dc(dest_ip) as dest_count count as "Total Count" by src_ip vendor_action app dvc vsys
| where 'Total Count' &amp;gt; 500 AND dest_count &amp;gt; 5
| sort - count dest_count
| eval range = mvrange(0, if(dest_count &amp;lt; 10, dest_count - 1, 9))
| eval dest_ip = mvmap(range, mvindex(dest_ip, range))
| fields src_ip dvc vsys "Firewall Rule" app "Destination Port" vendor_action "Total Count"
| rename src_ip AS "Source IP", vendor_action AS "Action", dvc AS "Device", app AS "Application", dest_ip AS "Sample Target IP", dest_count as "Target Count"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Mar 2022 06:20:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-search-where-we-look-for-single-source-IP-s/m-p/590950#M205730</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-03-26T06:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup a search where we look for single source IP's hitting multiple destination IP's on our firewall</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-search-where-we-look-for-single-source-IP-s/m-p/590951#M205731</link>
      <description>&lt;P&gt;I see these are Palo Alto logs. I suppose you have a lot of them and searching takes time.&lt;/P&gt;&lt;P&gt;You might look into using accelerated datamodels to get your results relatively quickly.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Mar 2022 06:25:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-search-where-we-look-for-single-source-IP-s/m-p/590951#M205731</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-03-26T06:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup a search where we look for single source IP's hitting multiple destination IP's on our firewall</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-search-where-we-look-for-single-source-IP-s/m-p/590955#M205734</link>
      <description>&lt;P&gt;Thank you very much.&amp;nbsp; That worked.&amp;nbsp; Now I am trying to figure out how to display the results with the highest count at the top to the lowest.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Mar 2022 07:14:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-search-where-we-look-for-single-source-IP-s/m-p/590955#M205734</guid>
      <dc:creator>elijahputz</dc:creator>
      <dc:date>2022-03-26T07:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup a search where we look for single source IP's hitting multiple destination IP's on our firewall</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-search-where-we-look-for-single-source-IP-s/m-p/590956#M205735</link>
      <description>&lt;P&gt;Basically the Total Count should be highest at top and then to the lowest count.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The search works great, but the order of the results are out of order. I need them Highest count to lowest.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Mar 2022 07:21:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-search-where-we-look-for-single-source-IP-s/m-p/590956#M205735</guid>
      <dc:creator>elijahputz</dc:creator>
      <dc:date>2022-03-26T07:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup a search where we look for single source IP's hitting multiple destination IP's on our firewall</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-search-where-we-look-for-single-source-IP-s/m-p/590961#M205739</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;highest count at the top to the lowest.&amp;nbsp;&amp;nbsp;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;My mistake in the sort command. (Forgot I renamed 'count'.)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=pan_logs eventtype=pan_traffic dvc="FD0*.*" action=allow OR action=allowed OR action=alert app=sip OR dest_port=5060 OR dest_port=5061 AND src_ip!=10.0.0.0/8 AND src_ip!=172.16.0.0/12 AND src_ip!=192.168.0.0/16
| stats  values(rule) AS "Firewall Rule" values(dest_ip) AS dest_ip values(dest_port) AS "Destination Port" dc(dest_ip) as dest_count count as "Total Count" by src_ip vendor_action app dvc vsys
| where 'Total Count' &amp;gt; 500 AND dest_count &amp;gt; 5
| sort - "Total Count" dest_count
| eval range = mvrange(0, if(dest_count &amp;lt; 10, dest_count - 1, 9))
| eval dest_ip = mvmap(range, mvindex(dest_ip, range))
| fields src_ip dvc vsys "Firewall Rule" app "Destination Port" vendor_action "Total Count"
| rename src_ip AS "Source IP", vendor_action AS "Action", dvc AS "Device", app AS "Application", dest_ip AS "Sample Target IP", dest_count as "Target Count"&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 26 Mar 2022 08:19:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-search-where-we-look-for-single-source-IP-s/m-p/590961#M205739</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-03-26T08:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup a search where we look for single source IP's hitting multiple destination IP's on our firewall</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-search-where-we-look-for-single-source-IP-s/m-p/590963#M205741</link>
      <description>&lt;P&gt;I got it working. Thank you very much.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Mar 2022 08:32:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-search-where-we-look-for-single-source-IP-s/m-p/590963#M205741</guid>
      <dc:creator>elijahputz</dc:creator>
      <dc:date>2022-03-26T08:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup a search where we look for single source IP's hitting multiple destination IP's on our firewall</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-search-where-we-look-for-single-source-IP-s/m-p/590972#M205744</link>
      <description>&lt;P&gt;One last thing,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to show the total number of destinations that a source IP is hitting instead of a list of ALL the destination IP's?&lt;/P&gt;</description>
      <pubDate>Sat, 26 Mar 2022 20:14:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-search-where-we-look-for-single-source-IP-s/m-p/590972#M205744</guid>
      <dc:creator>elijahputz</dc:creator>
      <dc:date>2022-03-26T20:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup a search where we look for single source IP's hitting multiple destination IP's on our firewall</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-search-where-we-look-for-single-source-IP-s/m-p/590975#M205745</link>
      <description>&lt;P&gt;In my pseudo code,&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats ... dc(dest_ip) as dest_count by src_ip ...
...
| rename ... dest_count as "Target Count"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;gives the number of dest_ip per src_ip. &amp;nbsp;The code should only list up to 10 in "Sample Target IP" field. &amp;nbsp;If you don't need the sampling, just remove codes related to values(dest_ip).&lt;/P&gt;</description>
      <pubDate>Sun, 27 Mar 2022 00:25:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-search-where-we-look-for-single-source-IP-s/m-p/590975#M205745</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-03-27T00:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup a search where we look for single source IP's hitting multiple destination IP's on our firewall</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-search-where-we-look-for-single-source-IP-s/m-p/590978#M205746</link>
      <description>&lt;P&gt;I am basically trying to accomplish the following now.&amp;nbsp; Screenshot attached (Example in green)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want a count of how many IP's the source is hitting and to now show the IP's, just a count.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;index=pan_logs eventtype=pan_traffic dvc="FD0*.*" action=allow OR action=allowed OR action=alert app=sip OR dest_port=5060 OR dest_port=5061 AND src_ip!=10.0.0.0/8 AND src_ip!=172.16.0.0/12 AND src_ip!=192.168.0.0/16 AND src_zone=*-untrust | stats values(rule) AS "Firewall Rule" values(dest_port) AS "Destination Port" dc(dest_ip) as dest_count count as "Total Count" by src_ip vendor_action app dvc vsys_name | sort by "Total Count" desc limit=10 | where 'Total Count' &amp;gt; 500 AND dest_count &amp;gt; 5 | eval range = mvrange(0, if(dest_count &amp;lt; 10, dest_count - 1, 5)) | eval dest_ip = mvmap(range, mvindex(dest_ip, range)) | fields src_ip dvc vsys_name dest_ip app "Destination Port" "Firewall Rule" vendor_action "Total Count" | rename src_ip AS "Source IP", vendor_action AS "Action", dvc AS "Device", vsys_name AS "Virtual System", app AS "Application", dest_ip AS "Total Dest IP Count", "Total Count" AS "Count"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="splunk.jpg" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18787i96897C3ECDEE5677/image-size/large?v=v2&amp;amp;px=999" role="button" title="splunk.jpg" alt="splunk.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Mar 2022 02:42:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-search-where-we-look-for-single-source-IP-s/m-p/590978#M205746</guid>
      <dc:creator>elijahputz</dc:creator>
      <dc:date>2022-03-27T02:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup a search where we look for single source IP's hitting multiple destination IP's on our firewall</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-search-where-we-look-for-single-source-IP-s/m-p/590979#M205747</link>
      <description>&lt;P&gt;I figured it out.&amp;nbsp; Thank you so much&lt;/P&gt;</description>
      <pubDate>Sun, 27 Mar 2022 02:53:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-search-where-we-look-for-single-source-IP-s/m-p/590979#M205747</guid>
      <dc:creator>elijahputz</dc:creator>
      <dc:date>2022-03-27T02:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup a search where we look for single source IP's hitting multiple destination IP's on our firewall</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-search-where-we-look-for-single-source-IP-s/m-p/590980#M205748</link>
      <description>&lt;P&gt;If destination IPs are not of interest at all, you can greatly simplify by eliminating calculations related to values(dest_ip). &amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=pan_logs eventtype=pan_traffic dvc="FD0*.*" action=allow OR action=allowed OR action=alert app=sip OR dest_port=5060 OR dest_port=5061 AND src_ip!=10.0.0.0/8 AND src_ip!=172.16.0.0/12 AND src_ip!=192.168.0.0/16 AND src_zone=*-untrust
| stats values(rule) AS "Firewall Rule" values(dest_port) AS "Destination Port" dc(dest_ip) AS "Total Dest IP Count" count as Count by src_ip vendor_action app dvc vsys_name
| where Count &amp;gt; 500 AND 'Total Dest IP Count' &amp;gt; 5
| sort limit=10 - Count
| fields src_ip dvc vsys_name "Total Dest IP Count" app "Destination Port" "Firewall Rule" vendor_action Count
| rename src_ip AS "Source IP", vendor_action AS "Action", dvc AS "Device", vsys_name AS "Virtual System", app AS "Application"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;In the above, I switched the "sort limit=10 - Count" to &lt;EM&gt;after&lt;/EM&gt; "where" clause because it is slightly more efficient. (Note&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Sort#sort" target="_blank" rel="noopener"&gt;sort&lt;/A&gt;&amp;nbsp;doesn't use "by" or "desc" in syntax.)&lt;/P&gt;</description>
      <pubDate>Sun, 27 Mar 2022 03:41:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-search-where-we-look-for-single-source-IP-s/m-p/590980#M205748</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-03-27T03:41:51Z</dc:date>
    </item>
  </channel>
</rss>

