I've been trying a couple of days to make squid block several websites but I can not. Therefore I thought you guys might be of some help as far as this is concerned.
Here's my configuration file:
Code:
cache_mem 4 MB
cache_dir ufs /var/spool/squid/ 4 16 256
redirect_rewrites_host_header off
cache_replacement_policy lru
acl all src 0.0.0.0/0.0.0.0
acl Safe_ports port 80 # http
acl CONNECT method CONNECT
acl badsites dstdomain "/etc/squid/squid-block.acl"
# authentication
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/squid_passwd
acl passauth proxy_auth REQUIRED
acl ncsa_users proxy_auth REQUIRED
http_access allow passauth
http_access deny all badsites
#maximum_object_size 150000 KB
store_avg_object_size 50 KB
cache_effective_user squid
cache_effective_group squid
log_icp_queries off
buffered_logs off
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
store_dir_select_algorithm least-load
forwarded_for on
# what not to cache:
acl QUERY urlpath_regex cgi-bin \?
acl url_htm url_regex \.htm$
acl url_html url_regex \.html$
acl url_pdf url_regex \.pdf$
acl url_xls url_regex \.xls$
acl SSL_ports port 443 563
no_cache deny QUERY
no_cache deny url_xls
no_cache deny url_pdf
no_cache deny url_html
no_cache deny url_htm
no_cache deny SSL_ports
http_port 9999
and here's what I've got in the squid-block.acl:
Code:
root@us:/etc/squid# cat squid-block.acl
.pornhub.com
.google.com
sex
I've also tried a lot of mutations of the configs above, nevertheless, I'm still reaching sites in the squid-block.acl file. I have no idea what I am doing wrong. Can anyone help please?
Peter.