PDA

View Full Version : FC7 : SQUID: Block ads



spremi
31st July 2007, 10:21 PM
I am trying to block few sites with Squid in FC7.
But it doesn't seem to work.

In /etc/squid/squid.conf:

acl ListAdServers url_regex "/etc/squid/block.ads"
http_access deny ListAdServers
http_access deny all

always_direct allow all
In /etc/squid/block.ads:

\w+\.ads\.com
ads.com
.ads.com
\.ads\.com
Have tried the possibilities individually as well...

in the access.log:

1185916012.542 8184 127.0.0.1 TCP_MISS/200 5167 GET http://www.ads.com/ - DIRECT/208.254.26.132 text/html
1185916014.831 2295 127.0.0.1 TCP_MISS/200 1905 GET http://www.ads.com/styles/template/2ColumnLander.css.jsp? - DIRECT/208.2132 text/css

I am confused why "DIRECT" is returned.

Does the regex syntax really work?
Did not see any example with external list at http://wiki.squid-cache.org/ as well.

/thx/spremi