Contents
- 1 How do I run FortiGate command line?
- 2 How do I run a FortiGate script?
- 3 How do I save FortiGate CLI config?
- 4 How do I reset my FortiGate command line?
- 5 What is automation in Fortigate?
- 6 How do you send automated backups of the configuration from a Fortigate with an automation stitch?
- 7 What are the error messages in FortiGate CLI?
- 8 Can a FortiGate script be executed on another FortiGate device?
How do I run FortiGate command line?
Click on >_CLI Console or the CLI symbol >_ to open the CLI window in GUI.
How do I run a FortiGate script?
To run a script using the GUI:
- Click on your username and select Configuration > Scripts.
- Click Run Script.
- Select the text file containing the script on your management computer, then click OK. The script runs immediately, and the Script Execution History table is updated, showing if the script ran successfully.
How do you automate FortiGate?
To create an automation stitch in the GUI: On the root FortiGate, go to Security Fabric > Automation. Click Create New. The New Automation Stitch page opens. Enter a name for the automation stitch.
How can I check for running configuration in FortiGate?
To display the configuration of all config shells, you can use the show command from the root prompt.
- show system admin setting.
- show system backup all-settings.
- show system dns.
- show system global.
- show system interface.
- show system ntp.
- show system route.
How do I save FortiGate CLI config?
On the CLI the config becomes active and is saved when you leave a config block by typing next or end. If you configure something on your FortiGate which disables the connectivity from you to your firewall, this behaviour is bad. It is possible on the FortiGate to change it to “Config Save Revert”.
How do I reset my FortiGate command line?
- Access the system using a web browser.
- In the navigation tree, go to System -> Dashboard -> Status, and select the Revisions link for the System Information Widget.
- Click on Restore Factory Default.
- System will reboot and load basic configuration.
How do I run a FortiManager script?
To run a script:
- Go to Device Manager > Scripts.
- Select a script then click Run Script in the toolbar, or right-click on a script and select Run Script.
- Select a device group, devices, or a policy package.
- Click Run Now to run the script.
How do I write a FortiManager script?
To add a script to an ADOM: Select Create New, or right-click anywhere in the script list and select New from the menu, to open the Create Script dialog box. Enter the required information, then select OK to create the new script. Type a unique name for the script. This option points to the FortiManager online help.
What is automation in Fortigate?
Automation Stitches can be used to automate certain actions in response to certain triggers. This includes sending alert emails in response to specific events, and allows for far more granular log-based alerting that Alert Emails configured under Log & Report.
How do you send automated backups of the configuration from a Fortigate with an automation stitch?
Go in Security Fabric -> Automation. In the Trigger section select Schedule and in the Action section select CLI Script. Record the CLI script or upload it. Once the action is triggered in the Security Fabric -> Automation page is recording the Last Triggered Time.
How do I save changes in FortiGate command line?
By default, a FortiGate does autosave the configuration, every time you press Apply or OK in the GUI. On the CLI the config becomes active and is saved when you leave a config block by typing next or end.
Why do I need CLI scripts for Fortinet?
Setting FortiGate device information with CLI scripts gives you access to more settings and allows you more fine grained control than you may have in the Device Manager. Also CLI commands allow access to more advanced options that are not available in the FortiGate GUI.
What are the error messages in FortiGate CLI?
Most error messages you will see are regular FortiGate CLI error messages. If you are familiar with the CLI you will likely recognize them. command parse error: It was not possible to parse this line of your script into a valid FortiGate CLI command. Common causes for this are misspelled keywords or an incorrect command format.
Can a FortiGate script be executed on another FortiGate device?
One example of this is any script that includes the specific IP address of a FortiGate device’s interfaces cannot be executed on a different FortiGate device. Samples of CLI scripts have been included to help get you started writing your own scripts for your network administration tasks.
Is there limit to number of scripts allowed in fortimanager?
There is a limit to the number of scripts allowed on the FortiManager unit. Try removing an old script before trying to save your current one. As mentioned at the start of this chapter, ensure the console more command is disabled on the FortiGate devices where scripts execute.