Which http_access directive for Squid allows users in the ACL named sales_net to only access the Internet at times specified in the time_acl named sales_time?

A.

http_access deny sales_time sales_net

B.

http_access allow sales_net sales_time

C.

http_access allow sales_net and sales-time

D.

allow http_access sales_net sales_time

题解

Squid 设置档中的「acl」命令,可以替一个或多个主机与网络定义一个名称。例如:

acl home src 10.0.0.0/255.0.0.0

「acl」命令所定义出来的名称可以被重复用在「http_access」命令中,作为允许或是拒绝的网络对象。例如:

http_access allow home

或

http_access deny home

「acl」命令还可以替时间区段定义一个名称。例如:

acl lunchtime time MTWHF 12:00-13:00

「acl」命令所定义出来的时间区段的名称可以被重复用在「http_access」命令中,可以设置在特定时段允许或是拒绝指定的网络对象。例如:

http_access allow home lunchtime

所以答案是选项「B」。