Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
kirgevserrano
New Contributor

Automation stich for command

Hi,

 

Anyone who knows how to automate commands or where can i request a new feature on fortinet.

 

below is the command that we want to automate

-Disable NAT Traversal
-Re-enableNat Traversal
-Bring down the relevant tunnel and bring it back up again.

 

because customer don't want to do manually like this every two weeks because ISP side reset their connection every two week.

 

Hope you guys can help.

Thank you

ss
ss
1 REPLY 1
Somashekara_Hanumant

Hi,

Hi,

If you are looking to disable and enable the 'nattraversal' on IPSec phase1 settings, then you need to create action, trigger and Stitch as below

 

Action:

config system automation-action
edit "ipsec"
set action-type cli-script
set minimum-interval 120
set script "config vpn ipsec phase1-interface
edit \"test\"
set nattraversal disable
end

config vpn ipsec phase1-interface
edit \"test\"
set nattraversal enable
end

execute vpn ipsec tunnel down test
execute vpn ipsec tunnel up test"
set accprofile "super_admin"
next
end

 

action.JPG

 

Trigger: (based on your requirement you can configure the Trigger)

config system automation-trigger
edit "ipsec_weekly"
set trigger-type scheduled
set trigger-hour 10
set trigger-minute 49
next
end

 

daily.JPG

 

Stitch:

config system automation-stitch
edit "ipsec"
set trigger "ipsec_weekly"
config actions
edit 1
set action "ipsec"
set required enable
next
end
next
end

 

stitch.JPG

 

As per the above automation script, tunnel setting will be triggered daily at 10:49AM, according to your requirement you can scheduled the trigger.

 

Regards,

Somu

EMEA Technical Support
Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors