Re: [squid-users] acl help

From: Muthukumar <kmuthu_gct@dont-contact.us>
Date: Tue, 22 Jun 2004 15:06:33 +0530

> acl banned-clients src -i "/usr/local/squid/etc/banned-clients.txt"
> banned-clients.txt
> ::::::::::::::
> 146.141.59.230
> 146.141.59.231
> 146.141.59.232
> 146.141.59.233
> 146.141.59.234
> 146.141.59.235
> 146.141.59.236

If you use the src acl type,you have use the subnetmask with that ip-address.
If you are using class C type then define as,
146.141.59.230/32

You can very well use the limit of ip-address as like,
146.141.59.230-146.141.59.236/32

> acl files url_regex -i "/usr/local/squid/etc/banned-sites.txt"
> banned-sites.txt
> ::::::::::::::
> www.highveld.co.za/planet947/streaming.asp
> 209.245.59.17
> streamload.com

For url_regex acl ,you have to use ( ^ ) in the urls as
^http://www.highveld.co.za/planet947/streaming.asp

We can not use the IP-Address based urls in the url_regex acl type.
You have to use the dstdomain acl type for that one.

The domain entry streamload.com can not be parsed by url_regex,
Use the dstdom_regex for that as,

acl domain dstdom_regex .streamload.com

where ( . ) dot is important

> acl files url_regex -i "/usr/local/squid/etc/banned-files.txt"
> banned-files.txt
> ::::::::::::::
> \.mpeg$
> \.mpg$
> \.avi$
> \.wmv$
> \.mp3$
> \.rm$
> \.asf$

If you want to search regexp(attern) in the url, use the urlpath_regex acl.

> working like a charm!!!!!

If you want to know more about the acl settings and http_access rules,refer FAQ 10.

Regards,
Muthukumar.

---
===============  It is a "Virus Free Mail" ===============
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.708 / Virus Database: 464 - Release Date: 6/18/2004
Received on Tue Jun 22 2004 - 17:45:14 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Jul 01 2004 - 12:00:03 MDT