<?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: IPLocation: how to use with both src-ip and dest-ip? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/IPLocation-how-to-use-with-both-src-ip-and-dest-ip/m-p/121856#M32822</link>
    <description>&lt;P&gt;After some testing I figured it out, the search below works:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="IPS" | iplocation src_ip | rename Country as CC1 | iplocation dest_ip | rename Country as CC2 | table src_ip CC1 dest_ip CC2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;CC1 is the geo for the src-ip and CC2 is the geo for the dest-ip.&lt;/P&gt;</description>
    <pubDate>Wed, 22 Jan 2014 17:35:54 GMT</pubDate>
    <dc:creator>echojacques</dc:creator>
    <dc:date>2014-01-22T17:35:54Z</dc:date>
    <item>
      <title>IPLocation: how to use with both src-ip and dest-ip?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/IPLocation-how-to-use-with-both-src-ip-and-dest-ip/m-p/121855#M32821</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I know how to use the iplocation command to obtain geo ip information for a single field, for example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="IPS" | iplocation src_ip | table src_ip, City, Country
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is there a way to return geo ip information for 2 fields (in this case src-ip and dest-ip)?  I tried this but it doesn't work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="IPS" | iplocation src_ip, dest_ip | table src_ip, City, Country, dest_ip, City, Country
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How would I return geo ip info for both src-ip and dest-ip in a single search?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2014 16:56:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/IPLocation-how-to-use-with-both-src-ip-and-dest-ip/m-p/121855#M32821</guid>
      <dc:creator>echojacques</dc:creator>
      <dc:date>2014-01-22T16:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: IPLocation: how to use with both src-ip and dest-ip?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/IPLocation-how-to-use-with-both-src-ip-and-dest-ip/m-p/121856#M32822</link>
      <description>&lt;P&gt;After some testing I figured it out, the search below works:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="IPS" | iplocation src_ip | rename Country as CC1 | iplocation dest_ip | rename Country as CC2 | table src_ip CC1 dest_ip CC2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;CC1 is the geo for the src-ip and CC2 is the geo for the dest-ip.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2014 17:35:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/IPLocation-how-to-use-with-both-src-ip-and-dest-ip/m-p/121856#M32822</guid>
      <dc:creator>echojacques</dc:creator>
      <dc:date>2014-01-22T17:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: IPLocation: how to use with both src-ip and dest-ip?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/IPLocation-how-to-use-with-both-src-ip-and-dest-ip/m-p/121857#M32823</link>
      <description>&lt;P&gt;You can also accomplish the same thing by doing this:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;sourcetype="IPS" | iplocation prefix=CC1_ src_ip | iplocation prefix=CC2_ dest_ip |  table src_ip CC1_Country dest_ip CC2_Country&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;To access other data iplocation and that isn't part of the default values  (ex: timezone) , you would add the allfields=true parameter to each iplocation command:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;sourcetype="IPS" | iplocation prefix=CC1_ allfields=true src_ip | iplocation prefix=CC2_ allfields=true dest_ip |  table src_ip CC1_Country CC1_Timezone dest_ip CC2_Country CC2_Timezone&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0.1/SearchReference/Iplocation" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/6.0.1/SearchReference/Iplocation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:49:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/IPLocation-how-to-use-with-both-src-ip-and-dest-ip/m-p/121857#M32823</guid>
      <dc:creator>Gawker</dc:creator>
      <dc:date>2020-09-29T18:49:47Z</dc:date>
    </item>
  </channel>
</rss>

