1

I wanted to block google logo via Squid proxy:

enter image description here

So I added this line to block.acl:

google\..+/logos/.+ 

in squid.conf I have this:

acl bad_domain dstdom_regex "/etc/squid/block.acl" acl good_domain dstdom_regex "/etc/squid/white.acl" http_access deny bad_domain http_access allow good_domain http_access deny all 

But the image is still not blocked: https://www.google.ru/logos/doodles/2013/doctor-whos-50th-anniversary-6317003539218432-res.png.

What to do?

1 Answer 1

2

Given their docs:

dstdom_regex: destination (server) regular expression pattern matching

This should match only the server (i.e. the www.google.ru part in your example), while you want to use it to block a specific URL (i.e. server + path). I think you need to use this:

url_regex: URL regular expression pattern matching

instead. See e.g. this example from the above docs:

where it says:

acl special_client src 10.1.2.3 acl special_url url_regex ^http://www.squid-cache.org/Doc/FAQ/$ http_access allow special_client special_url http_access deny special_url 

This obviously an allow specification, but the same should hold for the deny specification you are after.

1
  • Important thing: you must deny URLs before http_access allow good_domain, where you allow them. Commented Nov 25, 2013 at 10:24

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.