[squid-users] TCP_DENIED/403 errors when ads blocking is activated

Nicolas e.conti at gmx.net
Sat Dec 3 15:03:05 UTC 2022


You're right, Matus. That was the issue.
I replace as you suggested:
acl ads dstdom_regex "/etc/squid/ad_block.txt"
by
acl ads dstdomain "/etc/squid/ad_block.txt"
and now it works.

Thank you very much, Matus !

Have a nice day.

Nicolas.

Le 03/12/2022 à 15:02, Matus UHLAR - fantomas a écrit :
> On 03.12.22 13:52, Nicolas wrote:
>> I installed squid on one of my servers, in order to block ads.
>>
>> When I do not activate ads blocking, it works fine.
>> However, when I do activate ads blocking, some website are not
>> accessible.
>> I can browse www.google.com for example, but I can't access
>> www.linuxhint.com and a LOT of other websites.
>>
>> Here's what appears in access.log :
>> 1670071413.742      0 192.168.228.145 TCP_DENIED/403 3985 CONNECT
>> linuxhint.com:443 - HIER_NONE/- text/html
>>
>> Here's my squid.conf file :
>
>> acl ads dstdom_regex "/etc/squid/ad_block.txt"
>> http_access deny ads
>
>> curl -sS -L --compressed
>> "http://pgl.yoyo.org/adservers/serverlist.php?hostformat=nohtml&showintro=0&mimetype=plaintext"
>> > /etc/squid/ad_block.txt
>> which is on my server :
>> -rw-r--r-- 1 root root 60609  2 déc.  16:40 /etc/squid/ad_block.txt
>>
>> I don't see anything special in that file, which contains for example :
>> 1-1ads.com
>> 101com.com
>> 101order.com
>> 123freeavatars.com
>> 180hits.de
>> 180searchassistant.com
>
> the "t.co" matches.
>
> there are no regexes in that file you should probably use "dstdomain"
> instead.
>
> regexes match . as any character and match in the middle of strings.
>



More information about the squid-users mailing list