
test_site acl
誰もアクセスしたことのないサイト(www.aaabbbcc.comなど)にアクセス拒否ポリシーを設定して実行すると、squid -k reconfigure
Squidはそのサイトを正しく記録します。
その後、test_site aclでwww.aaabbbccc.com URLをコメントアウトしてsquid -k reconfigure
再実行しました。したがって、Squidはサイトへの正しいアクセスを許可し、それをキャッシュします。
しかし、ここに問題があります。 test_site aclからコメントを削除して再度実行すると、squid -k reconfigure
URL www.aaabbbccc.comにアクセスできます(マシンキャッシュを消去しました)。
私の結論は、イカがイカキャッシュに保存されているサイトを拒否できることです。しかし、それは意味がありません。私は正しいですか?
これは私のものです。squid.conf
*#####################################################################################
ie_refresh on
#####################################################################################
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443
acl Safe_ports port 21
acl Safe_ports port 443
acl Safe_ports port 1025-65535
####################################################################################
acl NOCACHE url_regex "/etc/squid/regras/nocachesites"
####################################################################################
acl liberar_mac_x arp "/etc/squid/regras/liberar_mac_x"
####################################################################################
# Regras de Controle
####################################################################################
acl test_site url_regex -i "/etc/squid/regras/teste_lucas"
acl redelocal src 192.168.0.0/255.255.255.0
acl purge method PURGE
acl CONNECT method CONNECT
####################################################################################
no_cache deny NOCACHE
http_access allow liberar_mac_x
http_access deny teste_lucas
http_access allow redelocal
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access deny all
icp_access allow all
####################################################################################
http_port 3128 transparent
####################################################################################
cache_mem 256 MB
####################################################################################
#cache_dir ufs /var/spool/squid 2000 32 512
cache_dir ufs /home/squid 5000 32 256
####################################################################################
access_log /var/log/squid/access.log squid
log_fqdn on
####################################################################################
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
####################################################################################
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
####################################################################################
cache_effective_user proxy
cache_effective_group proxy
visible_hostname Servidor_de_Proxy
####################################################################################
error_directory /usr/share/squid/errors/Portuguese
####################################################################################
ignore_expect_100 on
####################################################################################
always_direct allow all
####################################################################################
*