Description |
This article describes how to use an automation stitch to run a CLI script and bounce the FortiGate interface during a fixed interval of time. An explanation is provided for how to bring down the interface and up during a scheduled time. |
Scope | FortiGate |
Solution |
Select the automation from Security Fabric -> Automation -> Trigger.
The automation stitch is configured where the trigger and action is chosen.
Similarly, follow these steps to configure the trigger and script to bring the port up:
Automation script to bring a port down in the CLI:
config system automation-trigger edit "ShutDown_Time" show config system automation-trigger edit "ShutDown_Time" set trigger-type scheduled next end
config system automation-action edit "port_shutdown" show config system automation-action edit "port_shutdown" set action-type cli-script edit port2 set status down end" set accprofile "super_admin" next end
edit "WAN_Shutdown" show config system automation-stitch edit "WAN_Shutdown" set trigger "ShutDown_Time" config actions edit 1 set action "port_shutdown" next end next end
Automation stitch to bring a port up in the CLI:
config system automation-trigger edit "Enable_time" show config system automation-trigger edit "Enable_Time" set trigger-type scheduled next end
edit "WAN_Enable" show config system automation-action edit "WAN_Enable" set action-type cli-script edit port2 set status up end" set accprofile "super_admin" next end
edit "WAN_Enable" show config system automation-stitch edit "WAN_Enable" set trigger "Enable_Time" config actions edit 1 set action "WAN_Enable" set required enable next end next end |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.