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

rename_objects.sh - bash script using CSV to bulk rename objects (on MDS)

RickHoppe
Advisor

Hi,

I've created a bash script to bulk rename objects listed in a CSV file. You need to run it on a MDS with the Management API enabled.

Features

  • Auto-detect API version of MDS.
  • Use CSV file for defining all objects to rename.
  • Bulk rename of TCP service objects is supported.
  • Bulk rename of UDP service objects is supported.
  • Bulk rename of Hosts objects is supported.
  • Bulk rename of Networks is supported.
  • Bulk rename of Service Groups is supported.
  • B
...;
TO ACCESS CHECKMATES TOOLBOX it's simple and free

Disclaimer: Check Point does not provide maintenance services or technical or customer support for third party content provided on this Site, including in CheckMates Toolbox. See also our Third Party Software Disclaimer.




3 Replies

_khard
Employee Alumnus
Employee Alumnus

Is this supported for single domain server running on R80.40 ? 

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

RickHoppe
Advisor

Hi  @_khard ,

This script was specifically written for a Multi-Domain environment, but you can easily modify it to work on a single management server.

It probably will work if you modify line 273 to:

mgmt_cli login user "$1" > id.txt

Note: You still need to enter a (fake) domainname but it will not be used to login. To remove this it would require a lot more custom modifications.

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

JozkoMrkvicka
Authority
Authority

Nice work !

I have some more features how to further develop this script.

1. Iterate over all Domains on MDS and check if the object to be renamed is existing on all Domains, not only on specified as an argument. You can specify only one Domain, but if you dont, the script will rename it on all Domains.

2. Integrate Global Domain, if present.

3. Rename the network objects searched by the IP addresses (not via name).

4. Automatic detection of SMS or MDS.

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos