<?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 to find ip addresses which have both received and sent a message? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-ip-addresses-which-have-both-received-and-sent-a/m-p/610269#M212223</link>
    <description>&lt;P&gt;&lt;SPAN&gt;It is sort of like multiplying the set with itself and getting a subset in mathematical term.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;my data is sth like this&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;src_ip&amp;nbsp; &amp;nbsp; dst_ip time X Y&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1.1.1.1&amp;nbsp; &amp;nbsp;2.2.2.2 1pm .. ...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2.2.2.2&amp;nbsp; &amp;nbsp;3.3.3.3&amp;nbsp; 3pm .. ...&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 22 Aug 2022 12:09:05 GMT</pubDate>
    <dc:creator>masoud</dc:creator>
    <dc:date>2022-08-22T12:09:05Z</dc:date>
    <item>
      <title>How to find ip addresses which have both received and sent a message?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-ip-addresses-which-have-both-received-and-sent-a/m-p/610269#M212223</link>
      <description>&lt;P&gt;&lt;SPAN&gt;It is sort of like multiplying the set with itself and getting a subset in mathematical term.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;my data is sth like this&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;src_ip&amp;nbsp; &amp;nbsp; dst_ip time X Y&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1.1.1.1&amp;nbsp; &amp;nbsp;2.2.2.2 1pm .. ...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2.2.2.2&amp;nbsp; &amp;nbsp;3.3.3.3&amp;nbsp; 3pm .. ...&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 12:09:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-ip-addresses-which-have-both-received-and-sent-a/m-p/610269#M212223</guid>
      <dc:creator>masoud</dc:creator>
      <dc:date>2022-08-22T12:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: find ip addresses which have both received and sent a message</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-ip-addresses-which-have-both-received-and-sent-a/m-p/610271#M212225</link>
      <description>&lt;P&gt;To get help in search forum, you really want to illustrate your data, or at least let people know which application/log your are referring to and pray that somebody here has worked on that same application/log.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 03:40:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-ip-addresses-which-have-both-received-and-sent-a/m-p/610271#M212225</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-08-22T03:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: find ip addresses which have both received and sent a message</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-ip-addresses-which-have-both-received-and-sent-a/m-p/610280#M212227</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/248761"&gt;@masoud&lt;/a&gt;&amp;nbsp;- This would be the simplest mathematical way to do it. (In Splunk though there could be a better way of doing depending on the data.)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| set intersect [&amp;lt;your-search&amp;gt; | dedup src_ip | table src_ip] [&amp;lt;your-search&amp;gt; | dedup dest_ip | table dest_ip]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps!!! Karma would be appreciated!!!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 05:23:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-ip-addresses-which-have-both-received-and-sent-a/m-p/610280#M212227</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2022-08-22T05:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: find ip addresses which have both received and sent a message</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-ip-addresses-which-have-both-received-and-sent-a/m-p/610287#M212229</link>
      <description>&lt;P&gt;Thx mate. I update the question with more information about my data. could you please have a look?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 06:14:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-ip-addresses-which-have-both-received-and-sent-a/m-p/610287#M212229</guid>
      <dc:creator>masoud</dc:creator>
      <dc:date>2022-08-22T06:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: find ip addresses which have both received and sent a message</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-ip-addresses-which-have-both-received-and-sent-a/m-p/610288#M212230</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thx mate. I update the question with more information about my data. could you please have a look?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 06:14:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-ip-addresses-which-have-both-received-and-sent-a/m-p/610288#M212230</guid>
      <dc:creator>masoud</dc:creator>
      <dc:date>2022-08-22T06:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: find ip addresses which have both received and sent a message</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-ip-addresses-which-have-both-received-and-sent-a/m-p/610292#M212231</link>
      <description>&lt;P&gt;If I understand you correctly, you have in your events a source and destination fields and you want to find values which are present in both of those fields within your time range (which would mean that there was a connection to such an IP as well as from it).&lt;/P&gt;&lt;P&gt;There are probably many different approaches to such problem but I'd simply do&lt;/P&gt;&lt;PRE&gt;&amp;lt;your search&amp;gt;&lt;BR /&gt;| stats values(src_ip) as src_ip values(dst_ip) as dst_ip&lt;BR /&gt;| transpose&lt;BR /&gt;| rename "row 1" as IP&lt;BR /&gt;| mvexpand IP&lt;BR /&gt;| stats count by IP&lt;BR /&gt;| where count=2&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Aug 2022 07:05:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-ip-addresses-which-have-both-received-and-sent-a/m-p/610292#M212231</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-08-22T07:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: find ip addresses which have both received and sent a message</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-ip-addresses-which-have-both-received-and-sent-a/m-p/610453#M212298</link>
      <description>&lt;P&gt;VatsalJagani&amp;nbsp;and&amp;nbsp;PickleRick's answers all should work. &amp;nbsp;Here's an alternative:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats values(src_ip) as src_ip values(dst_ip) as dst_ip
| eval src_ip_in_dst_ip = mvmap(src_ip, if(isnull(mvfind(dst_ip, "^" . src_ip . "$")), null(), src_ip))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output using your sample data is&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;DIV class=""&gt;src_ip&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;dst_ip&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;src_ip_in_dst_ip&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;DIV class=""&gt;1.1.1.1&lt;/DIV&gt;&lt;DIV class=""&gt;2.2.2.2&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;2.2.2.2&lt;/DIV&gt;&lt;DIV class=""&gt;3.3.3.3&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;2.2.2.2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 07:05:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-ip-addresses-which-have-both-received-and-sent-a/m-p/610453#M212298</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-08-23T07:05:22Z</dc:date>
    </item>
  </channel>
</rss>

