<?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: Creating a Lookup for respective cidr ranges in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Creating-a-Lookup-for-respective-cidr-ranges/m-p/559280#M158906</link>
    <description>&lt;P&gt;Thanks very much this worked!&lt;/P&gt;</description>
    <pubDate>Tue, 13 Jul 2021 15:12:55 GMT</pubDate>
    <dc:creator>cbrissett</dc:creator>
    <dc:date>2021-07-13T15:12:55Z</dc:date>
    <item>
      <title>Creating a Lookup for respective cidr ranges</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Creating-a-Lookup-for-respective-cidr-ranges/m-p/559092#M158830</link>
      <description>&lt;P&gt;Hi, I am trying to create a query to highlight when specified accounts are used outside of their corresponding IP range by using a csv Lookup table.&lt;/P&gt;&lt;P&gt;For example, user account 'user1' has signed in from source ip 10.0.0.200 but they are only meant to sign in from 10.0.0.0/25 or 11.0.0.0/25 or 12.0.0.0/25, The csv file would be like follows:&lt;/P&gt;&lt;P&gt;User, allowed_cidr_range1, allowed_cidr_range2, allowed_cidr_range3&lt;BR /&gt;User1, 10.0.0.0/25, 11.0.0.0/25, 12.0.0.0/25&lt;BR /&gt;User 2, 10.0.0.128/25, 11.0.0.128/25&amp;nbsp;&lt;BR /&gt;User 3 10.0.1.0/25&lt;/P&gt;&lt;P&gt;Note that some accounts have a single range, some multiple. Does anyone know how I could make an appropriate Lookup command that will only show user accounts that have been used outside of their designated ip ranges?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 14:00:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Creating-a-Lookup-for-respective-cidr-ranges/m-p/559092#M158830</guid>
      <dc:creator>cbrissett</dc:creator>
      <dc:date>2021-07-12T14:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Lookup for respective cidr ranges</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Creating-a-Lookup-for-respective-cidr-ranges/m-p/559096#M158834</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/236296"&gt;@cbrissett&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please try this example?&lt;/P&gt;&lt;P&gt;I have used lookup named&amp;nbsp;cidr_lookup.csv with below value.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;User,allowed_cidr_range1,allowed_cidr_range2,allowed_cidr_range3
User1,10.0.0.0/25,11.0.0.0/25,12.0.0.0/25
User2,10.0.0.128/25,11.0.0.128/25 
User3,10.0.1.0/25&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[cidr_lookup]
filename = cidr_lookup.csv&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;Search:&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;YOUR_SEARCH
| lookup cidr_lookup User output allowed_cidr_range1, allowed_cidr_range2, allowed_cidr_range3
|where NOT (cidrmatch(allowed_cidr_range1,source) OR cidrmatch(allowed_cidr_range2,source) OR cidrmatch(allowed_cidr_range3,source))
| table User source&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Sample Search :&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults count=255 | eval a=3 | accum a | eval source="10.0.0."+a,User="User1" 
| rename comment as "Upto Now is sample data only" 
| lookup cidr_lookup User output allowed_cidr_range1, allowed_cidr_range2, allowed_cidr_range3 
| where NOT (cidrmatch(allowed_cidr_range1,source) OR cidrmatch(allowed_cidr_range2,source) OR cidrmatch(allowed_cidr_range3,source)) 
| table User source&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;▄︻̷̿┻̿═━一&lt;BR /&gt;&lt;BR /&gt;If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 14:41:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Creating-a-Lookup-for-respective-cidr-ranges/m-p/559096#M158834</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-07-12T14:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Lookup for respective cidr ranges</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Creating-a-Lookup-for-respective-cidr-ranges/m-p/559280#M158906</link>
      <description>&lt;P&gt;Thanks very much this worked!&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2021 15:12:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Creating-a-Lookup-for-respective-cidr-ranges/m-p/559280#M158906</guid>
      <dc:creator>cbrissett</dc:creator>
      <dc:date>2021-07-13T15:12:55Z</dc:date>
    </item>
  </channel>
</rss>

