<?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 remove unused FW rules? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-unused-FW-rules/m-p/607205#M211115</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have about 100 rules and I want to count the number of logs are related to each rule.&lt;/P&gt;
&lt;P&gt;When I used "stats count" it counted those rules that have 1 or more logs, but didn't show all the rules with zero hits.&lt;/P&gt;
&lt;P&gt;I tried to import csv file that contains all the rules and to remove the rows that contains rules with 1 or more hits.&lt;/P&gt;
&lt;P&gt;Moreover, I tried the suggestion&amp;nbsp;here with no luck:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Splunk-Search/Using-Splunk-to-Find-Unused-Firewall-Policies/m-p/32802" target="_blank" rel="noopener"&gt;Solved: Using Splunk to Find Unused Firewall Policies - Splunk Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Any suggestion?&lt;/P&gt;
&lt;P&gt;Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jul 2022 14:47:55 GMT</pubDate>
    <dc:creator>joock3r</dc:creator>
    <dc:date>2022-07-27T14:47:55Z</dc:date>
    <item>
      <title>How to remove unused FW rules?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-unused-FW-rules/m-p/607205#M211115</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have about 100 rules and I want to count the number of logs are related to each rule.&lt;/P&gt;
&lt;P&gt;When I used "stats count" it counted those rules that have 1 or more logs, but didn't show all the rules with zero hits.&lt;/P&gt;
&lt;P&gt;I tried to import csv file that contains all the rules and to remove the rows that contains rules with 1 or more hits.&lt;/P&gt;
&lt;P&gt;Moreover, I tried the suggestion&amp;nbsp;here with no luck:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Splunk-Search/Using-Splunk-to-Find-Unused-Firewall-Policies/m-p/32802" target="_blank" rel="noopener"&gt;Solved: Using Splunk to Find Unused Firewall Policies - Splunk Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Any suggestion?&lt;/P&gt;
&lt;P&gt;Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 14:47:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-unused-FW-rules/m-p/607205#M211115</guid>
      <dc:creator>joock3r</dc:creator>
      <dc:date>2022-07-27T14:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: Unused FW rules</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-unused-FW-rules/m-p/607206#M211116</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/248051"&gt;@joock3r&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you have to put the firewall rules in a lookup (called e.g. firewall_rules.csv) containing at least one field (called rule).&lt;/P&gt;&lt;P&gt;In the firewall events you extracted a field called rule whose contents should match the lookup.&lt;/P&gt;&lt;P&gt;In this case, you could run this search to identify the not used ones.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index rule=*
| eval rule=lower(rule)
| stats count BY rule
| append [ | inputlookup firewall_rules.csv | eval rule=lower(rule), count=0 | fields rule count ]
| stats sum(count) AS total BY rule
| where total=0&lt;/LI-CODE&gt;&lt;P&gt;In this way you'll have the missing rules.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 13:59:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-unused-FW-rules/m-p/607206#M211116</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-07-27T13:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: Unused FW rules</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-unused-FW-rules/m-p/607335#M211159</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Works like a charm. Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 09:38:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-unused-FW-rules/m-p/607335#M211159</guid>
      <dc:creator>joock3r</dc:creator>
      <dc:date>2022-07-28T09:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: Unused FW rules</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-unused-FW-rules/m-p/607344#M211162</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/248051"&gt;@joock3r&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 10:55:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-unused-FW-rules/m-p/607344#M211162</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-07-28T10:55:30Z</dc:date>
    </item>
  </channel>
</rss>

