Squid: rep_mime_type or req_mime_type
I would like to block some files accessed by the staff in my company and verified that this can be accomplished using mimetypes. So I read on the web that this could do the trick:
1 - Basically create the acl: Code:
acl mimeblock rep_mime_type -i "\absolute_path\filename" Code:
^application/x-pn-mpg$ Code:
http_reply_access deny mimeblock 3 questions: 1 - Can anybody tell the difference between these squid directives: rep_mime_type & req_mime_type? 2 - Why do all mimetypes start with "^"; and end with "$"? 3 - Is the configuration above making sense to you? Thank you very much!!! :) |
1. From what I can see, it should be req_mime_type as well. Makes sense, req being, request and rep_mime_type is for post, methinks. So they cannot download nor upload the specified mime-types. You only block uploads here ... is that what you want?
2. Look up regular expressions ... in regular expressions, ^ means "stating with" and $ means "ending with". A bit like GLOB *blabla and blabla*. You know GLOB, maybe not from the name, when you open a command prompt on Windows, that is what you use ... you know, the ? and * business ... ;-) Oh, and do not look-up regular expressions on Microsoft sites, they tried to implement it in powershell and failed miserably ... LOL. 3. I would not know if this configuration makes sense ... sorry. But I would not like to work at your company ;-). But it should be http_reply_access deny mimeblockp And if you want to stop them from downloading: acl mimeblock req_mime_type -i "/absolute_path/filename" http_access deny mimeblockq About squid, check this out: http://www.visolve.com/squid/squid24...s_controls.php And in Linux, you use / and not \ as a path separator ... ;-) PS: Sorry for the many updates, it's late, I'm tired.... need a beer! |
All times are GMT -5. The time now is 03:41 AM. |