Example: Associating a Policy to a Scheduler (CLI)
A scheduler is referred by security policies to activate or deactivate a policy according to scheduled times. You can associate a policy with a scheduler as you create the policy.
In the following example, you configure schedulers that allow associated policies to be used to check for packet matches from noon to 6 PM on Saturdays and Sundays. Otherwise the policy is inactive.
user@host# set schedulers scheduler SatHrs saturday
start-time 12:00 stop-time 18:00 user@host# set schedulers scheduler SunHrs sunday start-time
12:00 stop-time 18:00
The following commands bind these schedules to policy abc allowing access during the specified weekend hours.
user@host# set security policies from-zone green to-zone
red policy abc scheduler-name SatHrsuser@host# set security policies from-zone green to-zone
red policy abc scheduler-name SunHrs
If you are finished configuring the device, commit the configuration.
Related Topics
- Junos OS Feature Support Reference for SRX Series and J Series Devices
- Security Policies Overview
- Example: Configuring Schedulers (CLI)
- Verifying Scheduled Policies
Hide Navigation Pane
Show Navigation Pane
Download
SHA1