|
发表于 2004-2-13 12:48:26
|
显示全部楼层
回复: squid对不同IP的时间限制问题
最初由 再吻我吧 发表
这是我配置文件一部分,实现对asus和accord的不限时上网,和对其他IP的限时上网,不知道对不对,请赐教!
acl asus src 192.168.0.200/255.255.255.0
http_access allow asus
acl accord src 192.168.0.254/255.255.255.0
http_access allow accord
acl all src 192.168.0.0/255.255.255.0
acl othertime time 7:00-22:00
http_access allow all
http_access allow othertime
位置需要换吗?
这里感觉有些问题:
1、acl asus src 192.168.0.200/255.255.255.0 这里要用255.255.255.255因为这是一个地址,不是网络。
2、acl othertime time 7:00-22:00 这里我记得要加上星期标识,不加不知道行不行。
3、
acl all src 192.168.0.0/255.255.255.0
acl othertime time 7:00-22:00
http_access allow all
http_access allow othertime
这里最好不要用all来做标识,因为squid顺序执行,最后一句需要deny all来对其它用户进行控制。你这样一来,就没有拒绝规则了。因为这里你没有拒绝语句,所以http_access allow othertime这一句应该改成:
http_access deny !othertime
我也不是很熟,错了请不要笑话:) |
|