Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Adity12
Collaborator
Jump to solution

How to Export The Rule Base and NAT use API Command?

Hi All,

 

I have some issue when trying to export the rule base and NAT.

The problem appears when I try to execute this command 

show access-rulebase offset 0 limit 20 name "Network" details-level "standard" use-object-dictionary true  --format json

but I confuse with the value of Network, I try to change it to Policy Name, but the result is not found that the object.

I also try on my lab, for that command, and if I used Network the command will successfully execute, but if I use standard, which is my package policy on lab it's not working.

Does anyone know what it refers for a value name? 

 

Actually, I try to export this rule base and NAT for migration from CP to Palo Alto, since my customer used expedition tools for migration.

I also attached, the capture requirement for using migrate tool Palo alto, it seems to use mgmt_cli but I refer use smartconsole CLI because i think it's almost  same.

For NAT command I already successfully execute the rest only for the rule base.

 

If my explanation is not clear, please let me know.

Thanks Regards

Dio Aditya Pradana

0 Kudos
1 Solution

Accepted Solutions
PhoneBoy
Admin
Admin

Right, because what SmartConsole shows you is the policy package name.
A policy package is made up of one or more layers, one or more of which is an access-rulebase.
What you need to know is the name of the relevant layer(s). 
To get that easily, use show package: https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/show-package~v1.8%20 
Example: mgmt_cli -r true show package name Network

View solution in original post

0 Kudos
3 Replies
PhoneBoy
Admin
Admin

Right, because what SmartConsole shows you is the policy package name.
A policy package is made up of one or more layers, one or more of which is an access-rulebase.
What you need to know is the name of the relevant layer(s). 
To get that easily, use show package: https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/show-package~v1.8%20 
Example: mgmt_cli -r true show package name Network

0 Kudos
Adity12
Collaborator

Hi @PhoneBoy,

Thanks for your feedback, I also try another command for smartconsole CLI, and the result I can execute for show access rulebase.

But do you have any way to copy and paste to a file or export by command? for now, I just drag all output from above until down and copy it to the file, and then I change it to a JSON file.

 

Thanks Regards

Dio Aditya Pradana

0 Kudos
PhoneBoy
Admin
Admin

Not from SmartConsole CLI.
mgmt_cli from the gateway or management can output its results directly in JSON when called with --format json

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events