<?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 How to filter CIDR in XQL search in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/how-to-filter-cidr-in-xql-search/m-p/425217#M950</link>
    <description>&lt;P&gt;Hi, I'm trying to build XQL queries that target internal vs external IP ranges.&lt;BR /&gt;&lt;BR /&gt;This is easy in the normal query builder with&amp;nbsp;10.0.0.0/8|172.16.0.0/12|192.168.0.0/16 but I'm not able to re-create this in XQL.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;dataset = xdr_data 
| filter event_type = NETWORK 
| filter action_remote_ip not in ("10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16") &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried this to look for external connections but I still get results in those ranges so I think it's string matching instead of using the CIDR. I could do this by string matching but this doesn't scale well for some IP ranges.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I also looked at the 2 CIDR functions &lt;STRONG&gt;incidr&lt;/STRONG&gt; and &lt;STRONG&gt;incidrlist&amp;nbsp;&lt;/STRONG&gt;however these have a different use case.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Does anyone know if this is possible? If so can you show me the syntax?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;/P&gt;&lt;P&gt;John.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 07 Aug 2021 12:18:34 GMT</pubDate>
    <dc:creator>John_Easton</dc:creator>
    <dc:date>2021-08-07T12:18:34Z</dc:date>
    <item>
      <title>How to filter CIDR in XQL search</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/how-to-filter-cidr-in-xql-search/m-p/425217#M950</link>
      <description>&lt;P&gt;Hi, I'm trying to build XQL queries that target internal vs external IP ranges.&lt;BR /&gt;&lt;BR /&gt;This is easy in the normal query builder with&amp;nbsp;10.0.0.0/8|172.16.0.0/12|192.168.0.0/16 but I'm not able to re-create this in XQL.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;dataset = xdr_data 
| filter event_type = NETWORK 
| filter action_remote_ip not in ("10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16") &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried this to look for external connections but I still get results in those ranges so I think it's string matching instead of using the CIDR. I could do this by string matching but this doesn't scale well for some IP ranges.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I also looked at the 2 CIDR functions &lt;STRONG&gt;incidr&lt;/STRONG&gt; and &lt;STRONG&gt;incidrlist&amp;nbsp;&lt;/STRONG&gt;however these have a different use case.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Does anyone know if this is possible? If so can you show me the syntax?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;/P&gt;&lt;P&gt;John.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Aug 2021 12:18:34 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/how-to-filter-cidr-in-xql-search/m-p/425217#M950</guid>
      <dc:creator>John_Easton</dc:creator>
      <dc:date>2021-08-07T12:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter CIDR in XQL search</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/how-to-filter-cidr-in-xql-search/m-p/426168#M954</link>
      <description>&lt;P&gt;I think your search can be accomplished by using this filter setup:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;dataset = xdr_data 
| filter event_type = NETWORK 
| alter remote_10 = incidr(action_remote_ip,"10.0.0.0/8") 
| alter remote_172 = incidr(action_remote_ip,"172.16.0.0/12")
| alter remote_192 = incidr(action_remote_ip,"192.168.0.0/16") 
| filter remote_10 = false and remote_172 = false and remote_192 = false&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Aug 2021 16:50:49 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/how-to-filter-cidr-in-xql-search/m-p/426168#M954</guid>
      <dc:creator>JRzepka</dc:creator>
      <dc:date>2021-08-11T16:50:49Z</dc:date>
    </item>
  </channel>
</rss>

