squid基本配置
时间:2006-11-17 来源:0217
1816行
acl mynetwork src 10.0.2.0/24
http_access allow mynetwork
###################################
2095行 visible_hostname 10.0.2.152
######################################
1819
acl allowed_clients src 10.0.2.0
acl regular_days time MTWHF 10:00-16:00
http_access allow allowed_clients regular_days
http_access deny !allowed_clients
这个规则允许子网10.0.2.0这个客户机在周一到周五的上午10:00到下午4:00可以上网
########################################
acl hosts1 src 192.168.0.10
acl hosts2 src 192.168.0.20
acl hosts3 src 192.168.0.30
acl morning time 10:00-13:00
ack lunch time 13:30-14:30
ack 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时段可以上网
acl mynetwork src 10.0.2.0/24
http_access allow mynetwork
###################################
2095行 visible_hostname 10.0.2.152
######################################
1819
acl allowed_clients src 10.0.2.0
acl regular_days time MTWHF 10:00-16:00
http_access allow allowed_clients regular_days
http_access deny !allowed_clients
这个规则允许子网10.0.2.0这个客户机在周一到周五的上午10:00到下午4:00可以上网
########################################
acl hosts1 src 192.168.0.10
acl hosts2 src 192.168.0.20
acl hosts3 src 192.168.0.30
acl morning time 10:00-13:00
ack lunch time 13:30-14:30
ack 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时段可以上网
相关阅读 更多 +