<?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: How to find events that have non RFC1918 addresses in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-events-that-have-non-RFC1918-addresses/m-p/568325#M198042</link>
    <description>&lt;PRE&gt;| where NOT cidrmatch("10.0.0.0/8,ip) AND NOT cidrmatch("192.168.0.0/16",ip) AND [...]&lt;/PRE&gt;</description>
    <pubDate>Fri, 24 Sep 2021 06:01:35 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2021-09-24T06:01:35Z</dc:date>
    <item>
      <title>How to find events that have non RFC1918 addresses</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-events-that-have-non-RFC1918-addresses/m-p/568308#M198037</link>
      <description>&lt;P&gt;Issue I'm facing:&lt;/P&gt;&lt;P&gt;My use case is to detect a successful ssh login from an external ip_address.&lt;/P&gt;&lt;P&gt;I have my linux logs in: index=linux_logs&lt;/P&gt;&lt;P&gt;These logs have a field called "hostname". "hostname" is sometimes a FQDN and sometimes it's an ip_address. I have an asset list (lookup file),&amp;nbsp; assets.csv.&amp;nbsp; Not all of the FQDN from the linux_logs are in this list.&lt;/P&gt;&lt;P&gt;Here is my initial query:&lt;/P&gt;&lt;P&gt;index=linux_logs sourcetype=syslog exe="/usr/sbin/sshd" res=success NOT hostname=?&lt;/P&gt;&lt;P&gt;| stats count, min(_time) as first_time, max(_time) as last_time, values(dest) as dest, values(hostname) as src by acct&lt;/P&gt;&lt;P&gt;| lookup assets.csv dns AS src OUTPUT ip&lt;/P&gt;&lt;P&gt;| fillnull value=no_ip ip&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A sample of the results:&lt;/P&gt;&lt;TABLE width="832"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="156"&gt;acct&lt;/TD&gt;&lt;TD width="42"&gt;count&lt;/TD&gt;&lt;TD width="132"&gt;first_time&lt;/TD&gt;&lt;TD width="132"&gt;last_time&lt;/TD&gt;&lt;TD width="153"&gt;dest&lt;/TD&gt;&lt;TD width="142"&gt;hostname&lt;/TD&gt;&lt;TD width="75"&gt;ip&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;user1&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;TD&gt;epoch_time_format&lt;/TD&gt;&lt;TD&gt;epoch_time_format&lt;/TD&gt;&lt;TD&gt;host1.mycompany.com&lt;/TD&gt;&lt;TD&gt;src1.mycompany.com&lt;/TD&gt;&lt;TD&gt;10.36.25.14&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;user2&lt;/TD&gt;&lt;TD&gt;40&lt;/TD&gt;&lt;TD&gt;epoch_time_format&lt;/TD&gt;&lt;TD&gt;epoch_time_format&lt;/TD&gt;&lt;TD&gt;host3.mycompany.com&lt;/TD&gt;&lt;TD&gt;src3.mycompany.com&lt;/TD&gt;&lt;TD&gt;no_ip&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I want to eliminate the RFC1918 and keep the "no_ip" and ip's outside of the RFC1918 ranges. I do have a lookup for the rfc1918 ranges but I'm struggling with how to write the spl to check the "ip" field for what I need. Any help is greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2021 20:13:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-events-that-have-non-RFC1918-addresses/m-p/568308#M198037</guid>
      <dc:creator>wtaylor149</dc:creator>
      <dc:date>2021-09-23T20:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to find events that have non RFC1918 addresses</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-events-that-have-non-RFC1918-addresses/m-p/568325#M198042</link>
      <description>&lt;PRE&gt;| where NOT cidrmatch("10.0.0.0/8,ip) AND NOT cidrmatch("192.168.0.0/16",ip) AND [...]&lt;/PRE&gt;</description>
      <pubDate>Fri, 24 Sep 2021 06:01:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-events-that-have-non-RFC1918-addresses/m-p/568325#M198042</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-09-24T06:01:35Z</dc:date>
    </item>
  </channel>
</rss>

