Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I configure squid like this, but the blacklist doesn't work. I look for something in the web, but nothing.

#SQUID squid.conf

http_port 8080

############################################################

#Database Authentication MYSQL

auth_param basic program /usr/lib/squid3/squid_db_auth --dsn "DBI:mysql:database=something " --user something --password something --plaintext --persist
auth_param basic children 5
auth_param basic realm Web-Proxy
auth_param basic credentialsttl 30 minute
auth_param basic casesensitive off
acl db-auth proxy_auth REQUIRED
http_access allow db-auth

#############################################################

#ACL

acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
acl SSL_ports port 443
acl Safe_ports port 80      # http
acl Safe_ports port 21      # ftp
acl Safe_ports port 443     # https
acl Safe_ports port 70      # gopher
acl Safe_ports port 210     # wais
acl Safe_ports port 1025-65535  # unregistered ports
acl Safe_ports port 280     # http-mgmt
acl Safe_ports port 488     # gss-http
acl Safe_ports port 591     # filemaker
acl Safe_ports port 777     # multiling http
acl CONNECT method CONNECT

acl blacklist dstdom_regex -i "/etc/squid3/blacklist"

##############################################################


#LISTA OPERAZIONI ACL
http_access deny blacklist

http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny all

##############################################################

coredump_dir /var/spool/squid3

The blacklist is like this:

facebook.it
facebook.com
share|improve this question
    
Welcome to AU? A quick question about your output, the line " http_access deny blacklist", should that not read " http_access allow blacklist". perhaps if you change this setting –  Stephen Myall Jul 9 '12 at 10:30
add comment

1 Answer

http_access statements are evaluated sequentially for each request and once matched the evaluations stops. Thus http_access allow db-auth should be placed after http_access deny blacklist. This way, the blacklist is applied and after that the authentication takes place.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.