<?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 Using lookup table with host-ip association in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-lookup-table-with-host-ip-association/m-p/668973#M229468</link>
    <description>&lt;P&gt;Hi, I would like to ask a question regarding the lookups table.&lt;/P&gt;&lt;P&gt;I am managing logs about login and I want to be sure that on a specific host you can access only with a specific IP address, otherwise alert is triggered.&lt;/P&gt;&lt;P&gt;So basically I have a lookup built like this&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;IP&lt;/TD&gt;&lt;TD width="50%"&gt;HOST&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;1.1.1.1&lt;/TD&gt;&lt;TD width="50%"&gt;host1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;2.2.2.2&lt;/TD&gt;&lt;TD width="50%"&gt;host2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;3.3.3.3&lt;/TD&gt;&lt;TD width="50%"&gt;host3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;My purpose is to build a query search that finds whenever the IP-HOST association is not respected.&lt;/P&gt;&lt;P&gt;1.1.1.1 connects to host1 ---&amp;gt; OK&lt;/P&gt;&lt;P&gt;1.1.1.1 connects to host2 ---&amp;gt; BAD&lt;/P&gt;&lt;P&gt;2.2.2.2 connects to host1 ---&amp;gt; BAD&lt;/P&gt;&lt;P&gt;The connection from host1 should arrive only from 1.1.1.1, etc..&lt;/P&gt;&lt;P&gt;How can I text this query?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Fri, 17 Nov 2023 09:15:04 GMT</pubDate>
    <dc:creator>User2</dc:creator>
    <dc:date>2023-11-17T09:15:04Z</dc:date>
    <item>
      <title>Using lookup table with host-ip association</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-lookup-table-with-host-ip-association/m-p/668973#M229468</link>
      <description>&lt;P&gt;Hi, I would like to ask a question regarding the lookups table.&lt;/P&gt;&lt;P&gt;I am managing logs about login and I want to be sure that on a specific host you can access only with a specific IP address, otherwise alert is triggered.&lt;/P&gt;&lt;P&gt;So basically I have a lookup built like this&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;IP&lt;/TD&gt;&lt;TD width="50%"&gt;HOST&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;1.1.1.1&lt;/TD&gt;&lt;TD width="50%"&gt;host1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;2.2.2.2&lt;/TD&gt;&lt;TD width="50%"&gt;host2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;3.3.3.3&lt;/TD&gt;&lt;TD width="50%"&gt;host3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;My purpose is to build a query search that finds whenever the IP-HOST association is not respected.&lt;/P&gt;&lt;P&gt;1.1.1.1 connects to host1 ---&amp;gt; OK&lt;/P&gt;&lt;P&gt;1.1.1.1 connects to host2 ---&amp;gt; BAD&lt;/P&gt;&lt;P&gt;2.2.2.2 connects to host1 ---&amp;gt; BAD&lt;/P&gt;&lt;P&gt;The connection from host1 should arrive only from 1.1.1.1, etc..&lt;/P&gt;&lt;P&gt;How can I text this query?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2023 09:15:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-lookup-table-with-host-ip-association/m-p/668973#M229468</guid>
      <dc:creator>User2</dc:creator>
      <dc:date>2023-11-17T09:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using lookup table with host-ip association</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-lookup-table-with-host-ip-association/m-p/668983#M229471</link>
      <description>&lt;P&gt;Just do a lookup using both fields (source IP and destination host) and output one of those fields as a new field.&lt;/P&gt;&lt;P&gt;Something like&lt;/P&gt;&lt;PRE&gt;| lookup allowed_ips IP AS src_ip HOST as dst_host OUTPUT HOST AS matchhost&lt;/PRE&gt;&lt;P&gt;This will create a field called matchhost which will be populated only if both src_ip and dst_host in your event match one of the entries from your lookup.&lt;BR /&gt;You can now search for the events matching or not matching your criteria by verifying if matchhost is null or not.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2023 10:22:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-lookup-table-with-host-ip-association/m-p/668983#M229471</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-11-17T10:22:35Z</dc:date>
    </item>
  </channel>
</rss>

