How to tell which Objects & Rules are being used.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Please sign in to see details of an important advisory in our Customer Advisories area.

How to tell which Objects & Rules are being used.

Not applicable

I want to find a way to tell which address and services objects are not applied to a NAT or security rule and which NAT and security rules are not getting used?

Any Ideas on how to get this information?

Thanks

Bane

1 accepted solution

Accepted Solutions

L4 Transporter

I have researched this with engineering and currently there isn't a way to easily filter this type of live data from the Paloalto device.

View solution in original post

5 REPLIES 5

L4 Transporter

I have researched this with engineering and currently there isn't a way to easily filter this type of live data from the Paloalto device.

It's do-able at the cli with some shell scripting.

 

If you export the configuration in set cli config-output-format set format, then a relatively simple shell script is sufficient to point out various objects :-

 

 

for obj in $(awk '/^set address/ {print $3}' firewall.conf)
do
  echo $obj $(grep $obj firewall.conf | wc -l)
done

 

 

A count of 1 is worth investigating, and this method can be extended to look at other object types. 

This question has been asked in various forms by multiple people.  Working on Sidewinder, CheckPoint, PaloAlto, Juniper, Cisco firewalls this requested function is really too complicated.  Most of the times it's just a "this object is unused (not in policy)" or "this rule is unused (never hit)," but never really accounting for object usage in a rule or how often or how much a rule/object is used.

 

Really for detailed rule/object analysis a clean easy way is to use a 3-part product called FireMon https://www.firemon.com/ they integrate well with Palo and have great support.  Any enterprise level org would really enhance their FW service ownership by investing in that tool.  (No I don't work for FireMon)

L0 Member
You can identify the both security and NAT rules that are unused by logging on to the actual firewall, select policies, security, at the bottom to the right of the "add" is "highlight unused rules", this shades the unused ones in red, the same can be done for the NAT rules. Also in the ACC, bottom right graph/table is "rule usage", you can maximise and see bytes,sessions etc usage for each rule This is in 7.0.4 , don't know about v6 as we have never deployed that version.

The drawback to "highlight unused rules" is that it's predicated upon a timer set by when the firewall was last rebooted.  So if someone might have rebooted the firewall last say around feburary and a company's tax office while completeing year-end tax business it's possible that rules might have been erroneously identified as being unnecessary.

 

Unused rules also doesn't take into account the objects used within the rule.

  • 1 accepted solution
  • 6235 Views
  • 5 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!