D-Link 2560G Network Router User Manual


 
Example 3.17. Setting up a Time-Scheduled Policy
This example creates a schedule object for office hours on weekdays, and attaches the object to an IP Rule that
allows HTTP traffic.
Command-Line Interface
gw-world:/> add ScheduleProfile OfficeHours
Mon=8-17 Tue=8-17 Wed=8-17 Thu=8-17 Fri=8-17
Now create the IP rule that uses this schedule. First, change the current category to be the main IP rule set:
gw-world:/> cc IPRuleSet main
Now, create the IP rule:
gw-world:/main> add IPRule Action=NAT Service=http
SourceInterface=lan SourceNetwork=lannet
DestinationInterface=any
DestinationNetwork=all-nets
Schedule=OfficeHours name=AllowHTTP
Return to the top level:
gw-world:/main> cc
Configuration changes must be saved by then issuing an activate followed by a commit command.
Web Interface
1. Go to Objects > Schedules > Add > Schedule
2. Enter the following:
Name: OfficeHours
3. Select 08-17, Monday to Friday in the grid
4. Click OK
1. Go to Rules > IP Rules > Add > IPRule
2. Enter the following:
Name: AllowHTTP
3. Select the following from the dropdown lists:
Action: NAT
Service: http
Schedule: OfficeHours
SourceInterface: lan
SourceNetwork lannet
DestinationInterface: any
DestinationNetwork: all-nets
4. Click OK
3.6. Schedules Chapter 3. Fundamentals
127