Created on
04-07-2016
06:39 AM
Edited on
09-20-2024
02:18 AM
By
Jean-Philippe_P
Description
Scope
FortiGate.
Solution
config firewall policy
edit 2
set srcintf "port9"
set dstintf "mgmt1"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "lunchtime"
set schedule-timeout enable
set service "ALL"
set utm-status enable
set av-profile "av-scan-flow"
set webfilter-profile "allow_facebook"
set ips-sensor "protect_client"
set application-list "default"
set profile-protocol-options "default"
set ssl-ssh-profile "certificate-inspection"
set nat enable
next
edit 1
set srcintf "port9"
set dstintf "mgmt1"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
set utm-status enable
set av-profile "default"
set webfilter-profile "default"
set ips-sensor "protect_client"
set application-list "default"
set profile-protocol-options "default"
set ssl-ssh-profile "certificate-inspection"
set nat enable
next
end
Verification.
diag sys session list
session info: proto=6 proto_state=11 duration=0 expire=311 timeout=3600 flags=00000000 sockflag=00000000 sockport=80 av_idx=1 use=4
origin-shaper=
reply-shaper=
per_ip_shaper=
ha_id=0 policy_dir=0 tunnel=/
state=redir local may_dirty ndr hlife
statistic(bytes/packets/allow_err): org=754/4/1 reply=627/3/1 tuples=3
orgin->sink: org pre->post, reply pre->post dev=36->3/3->36 gwy=192.18.17.254/10.18.0.150
hook=post dir=org act=snat 10.18.0.150:39801->198.41.207.97:80(192.18.16.182:39801)
hook=pre dir=reply act=dnat 198.41.207.97:80->192.18.16.182:39801(10.18.0.150:39801)
hook=post dir=reply act=noop 198.41.207.97:80->10.18.0.150:39801(0.0.0.0:0)
pos/(before,after) 0/(0,0), 0/(0,0)
misc=0 policy_id=2 auth_info=0 chk_client_info=0 vd=0
serial=00032bea tos=ff/ff ips_view=2 app_list=2001 app=0
dd_type=0 dd_mode=0
npu_state=0x000400
The following example allows users able to access Youtube during break time everyday (12:00 - 14:00).
For the recurring schedule, refer to the article Technical Tip: How to configure schedule policy with deny action. The sample below for schedule is set from 12 pm - 2 pm every day:
When both policies are enabled, make sure that the allow policy is above the block policy. Refer to the below screenshot:
The expected result is the user able to view Youtube videos during the configured schedule.
Related Article:
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.