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: Wednesday, February 09, 2005 2:11 AM
> To: Chris Robertson
> Cc: squid-users@xxxxxxxxxxxxxxx
> Subject: RE: [squid-users] blocking urls
> 
> 
> Cópia Chris Robertson <crobertson@xxxxxxx>:
> 
>> > -----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?p63731
>> >
>> > 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?p63731
>> > 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?p63731
>>
>> 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\?p63731
>>
>> 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
>> 
> 
> Hi Chris,
> 
> Thank you very much for your piece of information!
> No doubt i was not blocking a thing since i wasn't
> matching that url.
> I readed the url you sent just to understand how regex
> works and i got thew idea. Thank you for pointing me on
> the right direction.
> 
> Now the situation is the following:
> 
> when o match that url i got the information that the
> following is being blocked:
> 
> awprofessional.com/articles/article.asp?
> 
> Shouldn't it be blocking 
> 
> awprofessional.com/articles/article.asp?p63731
> 
> instead?
> 
> the "p63731" is missing.
> 
> I assume i am only blocking
> awprofessional.com/articles/article.asp which means
> that if there is a url beyond this one i won't be able
> to access it.
> Is that right? If it is right, is there a way to block
> this exact url?
> 
> Thanks once again for your time!
> 
> *cipher*

You likely have "strip_query_terms" on (it's settable in the squid.conf.
It's on by default, and strips anything after a question mark (?) from the
URL before logging it.  As long as you are specifying the regex as I typed
it above, you should be just fine.  If you want, test it by going to the
site, and selecting a different article.

Chris


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

  Powered by Linux