<?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 Comparing IP Addresses for differences in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Comparing-IP-Addresses-for-differences/m-p/570927#M198954</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I'm trying to create a search, to potentially be made into a monitoring rule later on.&lt;/P&gt;&lt;P&gt;What I am trying to achieve is a way to compare if a user has logged into his machine from a wildly different IP address.&amp;nbsp; This will be using external IP addresses only.&lt;/P&gt;&lt;P&gt;As an example I want to know if a user logged into the estate from an IP which wasn't the same or similar as the previous day.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%"&gt;User&lt;/TD&gt;&lt;TD width="25%"&gt;Today&lt;/TD&gt;&lt;TD width="50%"&gt;Yesterday&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%"&gt;User A&lt;/TD&gt;&lt;TD width="25%"&gt;155.123.1.1&lt;/TD&gt;&lt;TD width="50%"&gt;155.123.1.1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%"&gt;User B&lt;/TD&gt;&lt;TD width="25%"&gt;155.124.1.2&lt;/TD&gt;&lt;TD width="50%"&gt;155.125.20.2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%"&gt;User C&lt;/TD&gt;&lt;TD width="25%"&gt;155.166.2.5&lt;/TD&gt;&lt;TD width="50%"&gt;22.18.254.56&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the table able, I have 3 users, user A and B have logged into pretty similar IP's although user B has logged in from a different one today ( this often happens in our logs ).&amp;nbsp; What I am more wanting to see is User C, who has logged into from a completely subnet IP and is not similar to their IP from the previous day.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;This is what I have so far:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=foo (earliest=-1d@d latest=now())  
| eval TempClientIP=split(ForwardedClientIpAddress,",")
| eval ClientIP=mvindex(TempClientIP,0) 
|  eval ClientIP1=mvindex(TempClientIP,1) 
|  eval ClientIP2=mvindex(TempClientIP,2) 
| search NOT ClientIP=10.*
| where LIKE("ClientIP","ClientIP")
| eval when=if(_time&amp;lt;=relative_time(now(), "@d"), "Yesterday", "Today")
| chart values(ClientIP) over user by when 
|  where Yesterday!=Today&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some context regarding the search the ForwardedClientIpAddress field has 3 items inside, ClientIP + ClientIP1 are the same address, ClientIP2 is the end internal address. ClientIP can be an internal address, which is why there is a NOT to remove it from the searches.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be very much appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 14 Oct 2021 09:26:24 GMT</pubDate>
    <dc:creator>swright_rl</dc:creator>
    <dc:date>2021-10-14T09:26:24Z</dc:date>
    <item>
      <title>Comparing IP Addresses for differences</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparing-IP-Addresses-for-differences/m-p/570927#M198954</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I'm trying to create a search, to potentially be made into a monitoring rule later on.&lt;/P&gt;&lt;P&gt;What I am trying to achieve is a way to compare if a user has logged into his machine from a wildly different IP address.&amp;nbsp; This will be using external IP addresses only.&lt;/P&gt;&lt;P&gt;As an example I want to know if a user logged into the estate from an IP which wasn't the same or similar as the previous day.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%"&gt;User&lt;/TD&gt;&lt;TD width="25%"&gt;Today&lt;/TD&gt;&lt;TD width="50%"&gt;Yesterday&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%"&gt;User A&lt;/TD&gt;&lt;TD width="25%"&gt;155.123.1.1&lt;/TD&gt;&lt;TD width="50%"&gt;155.123.1.1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%"&gt;User B&lt;/TD&gt;&lt;TD width="25%"&gt;155.124.1.2&lt;/TD&gt;&lt;TD width="50%"&gt;155.125.20.2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%"&gt;User C&lt;/TD&gt;&lt;TD width="25%"&gt;155.166.2.5&lt;/TD&gt;&lt;TD width="50%"&gt;22.18.254.56&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the table able, I have 3 users, user A and B have logged into pretty similar IP's although user B has logged in from a different one today ( this often happens in our logs ).&amp;nbsp; What I am more wanting to see is User C, who has logged into from a completely subnet IP and is not similar to their IP from the previous day.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;This is what I have so far:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=foo (earliest=-1d@d latest=now())  
| eval TempClientIP=split(ForwardedClientIpAddress,",")
| eval ClientIP=mvindex(TempClientIP,0) 
|  eval ClientIP1=mvindex(TempClientIP,1) 
|  eval ClientIP2=mvindex(TempClientIP,2) 
| search NOT ClientIP=10.*
| where LIKE("ClientIP","ClientIP")
| eval when=if(_time&amp;lt;=relative_time(now(), "@d"), "Yesterday", "Today")
| chart values(ClientIP) over user by when 
|  where Yesterday!=Today&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some context regarding the search the ForwardedClientIpAddress field has 3 items inside, ClientIP + ClientIP1 are the same address, ClientIP2 is the end internal address. ClientIP can be an internal address, which is why there is a NOT to remove it from the searches.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be very much appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 09:26:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparing-IP-Addresses-for-differences/m-p/570927#M198954</guid>
      <dc:creator>swright_rl</dc:creator>
      <dc:date>2021-10-14T09:26:24Z</dc:date>
    </item>
  </channel>
</rss>

