Re: [squid-users] Blocking spesific url

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Fri, 11 Jul 2014 20:47:16 +1200

On 11/07/2014 7:50 p.m., Andreas Westvik wrote:
> Thanks for the reply everyone, I was trying to implement this in my squid.conf but 1) squid fails to restart 2)if it starts, no webpage will load.
> I even tried to paste only the akamaihd\.net\/battlelog\/background-videos\/ in my “adserver” file as well but no dice.
>
> Here is my (working) squid.conf without the acl.
>
> http_port 192.168.0.1:3128 transparent
> #Block
> acl ads dstdom_regex -i "/etc/squid3/adservers"
> http_access deny ads

Insert *right here* ...

 acl block url_regex -i akamaihd\.net\/battlelog\/background-videos\/
 http_access deny block

> acl LAN src 192.168.0.0/24
> http_access allow LAN
> http_access deny all
> maximum_object_size 100 MB
> cache_dir ufs /var/spool/squid3 5000 16 256
>
> And here is the top of my /etc/squid3/adservers file
>
> akamaihd\.net\/battlelog\/background-videos\/ <— Not working.
> rd.samsungadhub.com
> ad.samsungadhub.com
> http://eaassets-a.akamaihd.net/battlelog/background-videos/naval-mov.webm$
> (^|\.)serving-sys.com
> tracking.xwebhub.net

Some of these are not domain names. The dstdom_regex ACL type which is
using the contents of this file matches against *only* the
domain/hostname section of URLs.

PS. most of those entries are better matched using dstdomain type ACL.
Even serving-sys.com entry is equivalent to ".serving-sys.com" in
dstdomain format.

Amos
Received on Fri Jul 11 2014 - 08:47:25 MDT

This archive was generated by hypermail 2.2.0 : Fri Jul 11 2014 - 12:00:04 MDT