Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Voxx3l
Explorer

Export Specific Rules to CSV for a given object

Jump to solution

Hello,

 

I am trying to see if there is a good way to export specific policy rules to csv; only rules with a certain IP/Object. I know I can use the API, and other tools to export entire policies to .csv, but I only want rules that contain a specific object. The object/object rules I am looking for are used in many rules across different policies that all reside within the same SMC. So basically if I could export only the things that the "where used" option shows, that would be about perfect.

 

Thank you!

0 Kudos
1 Solution

Accepted Solutions
Bob_Zimmerman
Advisor

To help simplify application audits, I built a tool to do exactly that:

https://community.checkpoint.com/t5/API-CLI-Discussion/Export-all-rules-referencing-a-list-of-IPs/m-...

You can find the latest version on Github here:

https://github.com/Bob-Zimmerman/ipsToRulesCP

View solution in original post

0 Kudos
4 Replies
PhoneBoy
Admin
Admin

The results of the where-used API call should be able to provide you a list of rule UIDs, which you could then iterate over and show in the desired format.

0 Kudos
Voxx3l
Explorer

Hey thanks for the reply. Is there documentation for dumping that? I found something for the web-tool, but I didn't see anything for the API. I'm probably just looking in the wrong spot.

0 Kudos
Bob_Zimmerman
Advisor

To help simplify application audits, I built a tool to do exactly that:

https://community.checkpoint.com/t5/API-CLI-Discussion/Export-all-rules-referencing-a-list-of-IPs/m-...

You can find the latest version on Github here:

https://github.com/Bob-Zimmerman/ipsToRulesCP

View solution in original post

0 Kudos
Voxx3l
Explorer

Thank you! 

 

This is the closest thing I have seen to what I want. So I'll work with this for now.

0 Kudos