Search squid archive

RE: [squid-users] blocking urls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: cipher [mailto:cipher@xxxxxxxxxxx]
> Sent: Sunday, February 06, 2005 9:36 AM
> To: squid-users@xxxxxxxxxxxxxxx
> Subject: [squid-users] blocking urls 
> 
> 
> Hi people,
> 
> I am having serious trouble in blocking some urls.
> Let's say i would want to block the following url:
> 
> http://awprofessional.com/articles/article.asp?p=363731
> 
> I would use:
> 
> acl p-block-hacking-urls urlpath_regex -i
> "/usr/local/squid/filter/hacking/urls"
> 
> Because that is he file in which the url that i want to
> block, is in:
> 
> root@oreon:/usr/local/squid/filter/hacking# grep
> awprofessional.com urls 
> awprofessional.com/articles/article.asp?p=363731
> root@oreon:/usr/local/squid/filter/hacking# 
> 
> Fact is, that url is not being blocked.
> Strange thing is that there are a bunch of url that are
> actually being blocked, but some others are not.
> 
> Previously i was blocking urls with url_regex, but that
> doesn't fit since that if i want to have access to a
> url that is beyond the url that is being url_regexed i
> will not be able to rach it...
> 
> Any ideas? :)
> 
> Thanks in advance
> 
> PS -> a read throught the list and i found something
> talking about a dstdomain_regex option but when i use
> it in my acl squid doesn't seem to know what that is.
> Also used dstdom_regex and the problem persists...
> 
> Thanks for reading this
> 
> *cipher*

If I understand correctly, you are trying to use:

awprofessional.com/articles/article.asp?p=363731

as the regular expression to block.  The question mark (?) is messing you up
here, because it has special connotations in a regular expression (so do
periods (.) but they would not prevent this RE from working).

Use this instead:

awprofessional\.com/articles/article\.asp\?p=363731

and you should find that the article is blocked.  As has been stated before,
use dstdomian whenever possible, as regular expression matching is
computationally demanding.  In any case, there is a nice regular expression
tutorial at http://www.regular-expressions.info/tutorial.html

Chris

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux