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
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
Hi Jin,
This works like charming. Thank you very much :)
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1737 | |
1107 | |
752 | |
447 | |
240 |
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 2024 Fortinet, Inc. All Rights Reserved.