- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Automatically enable/ disable Policy using script
Hi all,
I'm looking for a solution to automatically enable/ disable a Policy using script.
Background:
We have a invoicing system on a Windows VM with a web interface for access on PC's in our local network.
The invoicing system creates an automatic backup and sent the backup to our company cloud.
One policy allows the invoicing VB to access the internet.
However, for security reason it is not necessary for the VM to have 24/7 internet access and the invoicing system works great without the policy enabled. The backup of the invoicing system takes about 10 min.
We would like to use a script or other steps to turn off the policy and back on for the time the system does the backup and upload the backup to our cloud.
Is that possible or is there a other way?
Many thanks in advance
- Labels:
-
FortiGate
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
If the backup always occurs at fixed time during the day, you can device a schedule in the policy itself which makes the policy active during the scheduled time.
config firewall policy
edit 0
set srcintf "lan"
set dstintf "wan"
set srcaddr "VM_Invoicing_System"
set dstaddr "all"
set action accept
set schedule "Everyday-0900-0915"
set schedule-timeout enable
set service "ALL"
set nat enable
next
end
best regards,
Jin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jin,
This works like charming. Thank you very much :)