[squid-users] wildcard for numbers in url whitelisting

Matus UHLAR - fantomas uhlar at fantomas.sk
Thu Jul 15 13:02:36 UTC 2021


On 15.07.21 13:54, robert k Wild wrote:
>ok this hasnt worked, its allowing all the internet now ie urls

improper regular expressions probably.
Are you aware that regular expressions can match in the middle of string?
you will need to use $ at the end of line e.g.

\.com$

to match .com domains (which is also reason to avoid regexps when posssible)

>#HTTP_HTTPS whitelist websites
>acl whitelist ssl::server_name "/usr/local/squid/etc/urlwhite.txt"
>
>#HTTP_HTTPS whitelist websites regex
>acl whitelistreg ssl::server_name_regex
>"/usr/local/squid/etc/urlwhitereg.txt"

>http_access allow activation

this one should allow whole internet too.

the standard squid config contains ACLs Safe_ports and SSL_ports along with 
directives to disallow using other ports, perhaps you should use those.

>http_access allow whitelist
>http_access allow whitelistreg
>http_access deny all
>
>On Thu, 15 Jul 2021 at 13:43, robert k Wild <robertkwild at gmail.com> wrote:
>
>> activation is an acl for ports, so
>>
>> acl activation port 80 443 8090 9251 # office adobe web
>>
>> On Thu, 15 Jul 2021 at 13:24, Matus UHLAR - fantomas <uhlar at fantomas.sk>
>> wrote:
>>
>>> On 15.07.21 13:08, robert k Wild wrote:
>>> >#HTTP_HTTPS whitelist websites
>>> >acl whitelist ssl::server_name "/usr/local/squid/etc/urlwhite.txt"
>>> >
>>> >#HTTP_HTTPS whitelist websites regex
>>> >#acl whitelistreg ssl::server_name_regex
>>> >"/usr/local/squid/etc/urlwhitereg.txt"
>>> >
>>>
>>> you must split those to two lines, as all ACLs must match for http_access
>>> line to match:
>>>
>>> http_access allow activation whitelist
>>> http_access allow activation whitelistreg
>>> http_access deny all
>>>
>>> I only can guess what "activation" means.
-- 
Matus UHLAR - fantomas, uhlar at fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
"Two words: Windows survives." - Craig Mundie, Microsoft senior strategist
"So does syphillis. Good thing we have penicillin." - Matthew Alton


More information about the squid-users mailing list