Check Point Scripts - execute scripts directly from Smart Console
- Tutorial
We previously wrote that all Check Point settings can be divided into two groups: System Settings and Security Settings. We can control system settings through the WebUI, either through the CLI, or through the Gaia REST API (starting at 80.10). Security settings are mainly edited through SmartConsole, or again, through the API. In 95% of cases, the administrator uses the SmartConsole. However, sometimes there is a need to access more advanced parameters or functions, which is only possible through the CLI. Previously, you had to connect via SSH for this, then remember the necessary command (for example, cphaprob state to check the cluster status). It is not very convenient and not so fast. Everything has changed with the advent of the Scripts Repository . We will devote this article to this thing.
Scripts repository
This thing appeared a long time ago, but many still do not know and do not use it. The access was quite simple, for this you need to right-click on the gateway or on the management server in SmartConsole:
Here you will see several ready-made scripts and their description. Also on top there is a panel with which we can control them:
By clicking on the View button you will see the contents of this script:
In fact, one command is “clogged” here. By clicking on the Run button we will run the script. Then again we see what is contained inside. In this case, it is possible to add your own arguments, if this implies the script itself. By clicking Run again , we will run the script:
Upon completion, we will see a message about successful execution at the bottom left:
By clicking on Details we will see the output of this script:
Create your own script
Let's create an example script, for example, to display installed patches and hotfixes. To do this, in the Scripts Repository, click on the New button and fill it as in the example below:
After saving the script, run it by clicking Run . Upon completion, you can see the output of this command:
As you can see, it is a very convenient and fast process. Scripts are available directly from SmartConsole and you no longer need to remember the commands used. With this we will end our little tutorial. More Check Point articles can be found on our blog or Telegram channel .