http_access訪問控制列表:
#http_access deny deny_url
http_access deny all
# TAG: http_access
# Allowing or Denying access based on defined access lists
添加訪問控制:
在/etc/squid3下創建控制文件guests:
guests裏輸入允許使用代理的ip。
在squid.conf中配置:
# log_uses_indirect_client on
以下是禁止訪問的網站
acl deny_url url_regex -i \.jd\.com 360buy taobao tmall amazon dangdang yihaodian vipshop jumei vancl suning youku tudou iqiyi ku6 \.qq\.com tv\.sohu v\.ifeng v\.163
http_access deny deny_url
#acl deny_url url_regex -i 172\.16 172\.26 172\.24 172\.31 10\.92 10\.128 gitweb opengrok
#http_access deny deny_url
acl guests src "/etc/squid3/guests"
http_access allow guests
http_access deny all
# TAG: http_access
#
Allowing or Denying access based on defined access lists
最後:sudo /usr/sbin/squid3 restart 啓動即可