Check Point firewalls use the batch command to create objects and policies

Step1: Bulk create network objects

Use mgmt_cli batch commands create host objects, note that the command requires administrator account and password

mgmt_cli add host name Host_10.133.1.100 ip-address 10.133.1.100 -u admin -p pwd@123
mgmt_cli add host name Host_10.133.1.110 ip-address 10.133.1.110 -u admin -p pwd@123
mgmt_cli add host name Host_10.133.1.120 ip-address 10.133.1.120 -u admin -p pwd@123
mgmt_cli add host name Host_10.133.1.130 ip-address 10.133.1.130 -u admin -p pwd@123
mgmt_cli add host name Host_10.133.1.140 ip-address 10.133.1.140 -u admin -p pwd@123
mgmt_cli add host name Host_10.133.1.150 ip-address 10.133.1.150 -u admin -p pwd@123

After execution results as shown below:
Check Point firewalls use the batch command to create objects and policies
See smartcenter host object on the following figure:

Check Point firewalls use the batch command to create objects and policies
Step2: Bulk create network objects

mgmt_cli add network name "Net_10.54.1.0/24" subnet "10.54.1.0" subnet-mask "255.255.255.0" --format json -u admin -p pwd@123
mgmt_cli add network name "Net_10.55.1.0/24" subnet "10.55.1.0" subnet-mask "255.255.255.0" --format json -u admin -p pwd@123
mgmt_cli add network name "Net_10.94.1.0/24" subnet "10.94.1.0" subnet-mask "255.255.255.0" --format json -u admin -p pwd@123

After performing viewed on smartcenter, as shown below:
Check Point firewalls use the batch command to create objects and policies
https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/add-nat-rule~v1.5%20

Guess you like

Origin blog.51cto.com/14773580/2482871