|
|
发表于 2004-7-19 18:11:30
|
显示全部楼层
限制访问时段。
acl allowed_clients src 192.168.0.1/255.255.255.0
acl regular_days time MTWHF 10:00-16:00
http_access allow allowed_clients regular_days
http_access deny !allowed_clients
这个规则允许子网192.168.0.1中的所有客户机在周一到周五的上午10:00到下午4:00
访问 Internet。
为不同的客户机分配不同的访问时段。
acl hosts1 src192.168.0.10
acl hosts2 src 192.168.0.20
acl hosts3 src 192.168.0.30
acl morning time 10:00-13:00
acl lunch time 13:30-14:30
acl evening time 15:00-18:00
http_access allow host1 morning
http_access allow host1 evening
http_access allow host2 lunch
http_access allow host3 evening
http_access deny all
在这个规则中,主机 host1 可以在 morning 和 evening 时段访问 Internet,主机
host2 和 host3 分别只能在 lunch 和 evening 时段访问 Internet。
注:
一个访问条目中所有的元素之间用与运算按下述方式连接 :
http_access Action statement1 AND staement2 AND statement OR.
多个 http_access 声明之间用或运算连接而每个访问条目中的元素用与运算连接,见
下:
http_access allow host1 morning evening
无法在时段 morning 和时段 evening 同时进行(morning AND evening ),这个表达
式将不会返回真值(TRUE),从而这个条目将不会引发任何动作。 |
|