<?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: Lookup Source IP or Destination IP value in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Lookup-Source-IP-or-Destination-IP-value/m-p/86123#M21975</link>
    <description>&lt;P&gt;Thanks for the answer starcher, however, what I really want is one field "Department".&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 08 Jul 2013 14:37:41 GMT</pubDate>
    <dc:creator>ccsfdave</dc:creator>
    <dc:date>2013-07-08T14:37:41Z</dc:date>
    <item>
      <title>Lookup Source IP or Destination IP value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-Source-IP-or-Destination-IP-value/m-p/86121#M21973</link>
      <description>&lt;P&gt;Greetings,&lt;/P&gt;

&lt;P&gt;My journey continues.  Now I would like to have a lookup match either the source or destination IP to an internal department.&lt;/P&gt;

&lt;P&gt;This works for src_ip:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[ipam]
filename = ipam.csv
match_type = CIDR(src_ip)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[pan_threat]
LOOKUP-ipam = ipam src_ip OUTPUTNEW Dept AS Department
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;ipam.csv&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;src_ip,Dept
10.1.15.0/24,Dept 1
10.1.16.0/24,Dept 1
10.8.1.0/18,Dept 2
10.9.1.0/19,Dept 3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now I would like to do the same with destination IP.&lt;/P&gt;

&lt;P&gt;I tried:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[dst_ip]
filename = ipam.csv
match_type = CIDR(dst_ip)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[pan_threat]
LOOKUP-dst_ip = ipam dst_ip OUTPUTNEW Dept AS Department
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;ipam.csv&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;dst_ip,src_ip,Dept
10.1.15.0/24,10.1.15.0/24,Dept 1
10.1.16.0/24,10.1.16.0/24,Dept 1
10.8.1.0/18,10.8.1.0/18,Dept 2
10.9.1.0/19,10.9.1.0/19,Dept 3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But no luck.  Thoughts on this would be very much appreciated!&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2013 15:16:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-Source-IP-or-Destination-IP-value/m-p/86121#M21973</guid>
      <dc:creator>ccsfdave</dc:creator>
      <dc:date>2013-07-05T15:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup Source IP or Destination IP value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-Source-IP-or-Destination-IP-value/m-p/86122#M21974</link>
      <description>&lt;P&gt;Go back to what you have at the top.  You don't want a field declared as a source type.&lt;BR /&gt;
I would also change your lookup table back to single column as you have in first example. Change src_ip field header to just ip.&lt;/P&gt;

&lt;P&gt;Then change this:&lt;BR /&gt;
LOOKUP-ipam = ipam src_ip OUTPUTNEW Dept AS Department&lt;/P&gt;

&lt;P&gt;To:&lt;BR /&gt;
LOOKUP-ipam_src = ipam ip AS src_ip OUTPUTNEW Dept AS Src_Department&lt;BR /&gt;
LOOKUP-ipam_dest = ipam ip AS dest_ip OUTPUTNEW Dept AS Dest_Department&lt;/P&gt;

&lt;P&gt;That will auto lookup your src_ip and dest_ip as ip from the file and return the results prefixed appropriately as Src_Department and Dest_Department.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:16:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-Source-IP-or-Destination-IP-value/m-p/86122#M21974</guid>
      <dc:creator>starcher</dc:creator>
      <dc:date>2020-09-28T14:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup Source IP or Destination IP value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-Source-IP-or-Destination-IP-value/m-p/86123#M21975</link>
      <description>&lt;P&gt;Thanks for the answer starcher, however, what I really want is one field "Department".&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2013 14:37:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-Source-IP-or-Destination-IP-value/m-p/86123#M21975</guid>
      <dc:creator>ccsfdave</dc:creator>
      <dc:date>2013-07-08T14:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup Source IP or Destination IP value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-Source-IP-or-Destination-IP-value/m-p/86124#M21976</link>
      <description>&lt;P&gt;The secret sauce on this was the class name - they have to be different but the field name can be the same.  Precedent will take place if src and dst are both in the 10.x.x.x range (in above example)&lt;/P&gt;

&lt;P&gt;[cisco_asa]&lt;BR /&gt;&lt;BR /&gt;
&lt;STRONG&gt;LOOKUP-ipam_source&lt;/STRONG&gt; = ipam_src src_ip OUTPUTNEW Dept AS Department &lt;BR /&gt;&lt;BR /&gt;
&lt;STRONG&gt;LOOKUP-ipam_destination&lt;/STRONG&gt; = ipam_dest dest_ip OUTPUTNEW Dept AS Department &lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:44:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-Source-IP-or-Destination-IP-value/m-p/86124#M21976</guid>
      <dc:creator>ccsfdave</dc:creator>
      <dc:date>2020-09-28T14:44:36Z</dc:date>
    </item>
  </channel>
</rss>

