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

NAT Parameters in CSV File for import it via API

Hi All,

 

we need to import approx 10,000 Host/network objects along with NAT parameters and "Install on" option.

As per my understanding i can create a csv file for it and import it using API

 

and below will be the CSV file parameters

==============================

name,ip-address,color

PC-A,10.1.1.1,yellow

PC-B,10.1.1.2,yellow

PC-C,10.1.1.3,yellow

============================

But I don's have any idea for Hide/Static NAT and "Install on" parameters.

 

Please suggest.

 

 

0 Kudos
4 Replies
Highlighted
Employee+
Employee+

If you're defining NAT in the host object, then it can be handled by the API with the nat-settings.ipv4-address and nat-settings.install-on parameters.

See https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/add-host~v1.5 for additional information on setting these in the hosts object.

If you're wanting to configure nat-rules in the policy, then the add-nat-rule command would be a place to start. This would be a separate operation from the add host command that you are attempting to use. 

- https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/add-nat-rule~v1.5

 

Make sure that you're using the correct revision of the API documentation for your version of R80 as there might be some differences in supported operations and syntax.

- https://sc1.checkpoint.com/documents/latest/APIs/index.html#api_versions~v1.5

0 Kudos
Highlighted
Admin
Admin

You will have issues trying to import 10,000 hosts in a single CSV file.
You will need to break it up into multiple files with no more than 500 lines each.
Highlighted

Hi,

Thanks for this valuable information. I will keep in mind.

But please suggest me the parameters for Hide and Static-NAT 

 

0 Kudos
Highlighted
Silver

As masher mentioned the whole list of possible options can be obtained from here, including the NAT settings for a new object. To be precise, what you are looking for it "nat-settings.method" which can have a value of either static or hide. In addition to that you need to specify the related NAT IP via "nat-settings.ip-address" + the auto-rule option in order to automatically create a related NAT rule, related to the specified NAT parameters in the object itself.