Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
Network Troublshooting => Linux Proxy Server Support => Topic started by: Avin on March 30, 2009, 01:23:36 PM
-
Hi All,
Is there any way to filter upload content using Squid ? I mean how to block only zip attachment sent via any mail account(gmail, yahoo) through squid. I don't want to block .doc and other text file. If it is not possible in squid then tell me software name which will do my work in linux. I hope I explain my problem well.. Plz help
Thanks,
Avin Tokade
-
You can block zip and exe files using squid but not sure if can do same in attachments too.
Add following in squid config file :
acl badfiles url_regex -i \.exe$ .\zip$
http_access deny badfiles
[/cod]
-
Thanks for reply... :)
But It will filter download. I want to block upload/attachment. I have already placed download restriction rules in squid. which is only apply on download side.
Avin
-
Never done that but blocking mime type can do a little as I saw on other place
acl fileupload req_mime_type -i ^multipart/form-data$
http_access deny fileupload
Only way to block certain type of form data, otherwise blocking update is not really possible as it is part of http request and blocking http is not really good idea as may result in non-functioning web forms.
-
Thanks dude... :)
I will try to implement in my office..
Avin..
-
Let me know if that works or if you find any other solution, do share here :)
-
Hi Ricky
Sorry for late reply. Actually I was busy in other work. I have tried this ACL. but It totally block some type of file. then
I try this squid directives and finally block any attachment greater than 512 KB. This is very helpful for me to block mail attachment but still I am waiting for individually file blocking because this directive block all file attachment including .doc and text file.
request_body_max_size 512 KB
Avin....
-
If I find something useful, I will share here.
Hope to see you around sharing your knowledge with others here !