Here is an example of something you could test in a lab and then modify for your needs if it is a good option for you.
You are dealing with large numbers of objects (16000 +) so it can impact the management server performance when you use the API to manage (show or delete) so many objects.
I would get an export of the management server and import it into a lab to test (and monitor performance impact).
Malicious_IP_group API export and transform with jq
Replace fwadmin with your SamrtConsole user name.
The commands progress, showing different information each time.
You don't need to consider all of them, just the interesting ones.
This is done in expert mode on the management command line.
mgmt_cli login user "fwadmin" > api-sid.txt
mgmt_cli -s api-sid.txt show groups
mgmt_cli -s api-sid.txt show group name Malicious_IP_group --format json
mgmt_cli -s api-sid.txt show group name Malicious_IP_group --format json | jq -r '.'
mgmt_cli -s api-sid.txt show group name Malicious_IP_group --format json | jq -r '.members[] | .name'
mgmt_cli -s api-sid.txt show group name Malicious_IP_group --format json | jq -r '.members[].name' > GROUP1.csv
This command filters for just names and then appends delete host name so that it actually builds the API commands needed to delete the objects. That way you could do it in manual batches, of 100 per session (publish after each one).
mgmt_cli -s api-sid.txt show group name Malicious_IP_group --format json | jq -r '.members[] | "delete host name " + .name' > script.txt
This one builds a CSV with just the object names.
You need to add the word name at the top (above the names).
mgmt_cli -s api-sid.txt show group name Malicious_IP_group --format json | jq -r '.members[].name' > Malicious_IP_group.csv
This will fail if the hosts are in the groups. Delete the groups first. Remove the groups from the rules before that. Publish changes.
The concern here is about the large number of objects names and therefore objects to delete in one session.
Might be best to break it into CSV files with 100 objects in each.
mgmt_cli -s api-sid.txt delete host --batch Malicious_IP_group.csv
Delete the groups using API (see above):
mgmt_cli -s api-sid.txt delete group name Malicious_IP_group
mgmt_cli -s api-sid.txt publish
https://sc1.checkpoint.com/documents/R81.20/WebAdminGuides/EN/CP_R81.20_RN/Content/Topics-RN/Maximum...
|
Changes in one session
|
100
|
No
|
To ensure optimal Management Server responsiveness, we recommend making 100 or fewer changes in each session (although the Management Server can support more than 500 changes at a time).
|