Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-01-2005, 01:50 AM
|
#1
|
Member
Registered: Mar 2005
Posts: 146
Rep:
|
Squid proxy (1): how to restrict the files above 2MB -- please help me
my localnetwork connect Internet through Linux gateway, all traffic transferd to port 8080 of Squid proxy. Client in localnetwork can access Internet to get file or tool for their work. However having some trouble is users get files or software very big : over 10MB.
How can i restrict file above 2MB, it's mean Squid proxy only allow the files below 2MB.
If we can control Squid solve my problem, please show me the way to do, or else please give me the best solution for this. Thank you very much.
|
|
|
04-01-2005, 02:10 AM
|
#2
|
Member
Registered: Apr 2004
Location: ..where no life dwells..
Posts: 541
Rep:
|
squid has a parameter to control the maxfilesize to CACHE, think what you are looking for (to block ACCESS) should be solved by an ACL
|
|
|
04-01-2005, 02:36 AM
|
#3
|
Member
Registered: Mar 2005
Posts: 146
Original Poster
Rep:
|
Thanks for your reply, however i can't understand clear about your idea.
Example i want to deny all of the files above 2MB. How can i do it with ACL or what.
Please tell me about specific.
Thank you very much.
|
|
|
04-01-2005, 04:27 AM
|
#4
|
Member
Registered: Mar 2005
Posts: 146
Original Poster
Rep:
|
Everybody, please help me.
I also refer SQUID document on squid-cache.org.
|
|
|
04-01-2005, 07:32 AM
|
#5
|
Member
Registered: Feb 2004
Posts: 273
Rep:
|
|
|
|
04-01-2005, 08:52 AM
|
#6
|
Member
Registered: Mar 2005
Posts: 146
Original Poster
Rep:
|
Quote:
Tag Name
reply_body_max_size
Usage
reply_body_max_size (KB)
Description
This option specifies the maximum size of a reply body. It can be used to prevent users from downloading very large files, such as MP3's and movies. The reply size is checked twice. First when we get the reply headers, we check the content-length value. If the content length value exists and is larger than this parameter, the request is denied and the user receives an error message that says "the request or reply is too large." If there is no content-length, and the reply size exceeds this limit, the client's connection is just closed and they will receive a partial reply.
Default
If this parameter is set to zero (the default), there will be no limit imposed.
reply_body_max_size 0
Example
-
Caution
Downstream caches probably cannot detect a partial reply if there is no content-length header, so they will cache partial responses and give them out as hits. You should NOT use this option if you have downstream caches
|
Thanks for your help, however the problem is:
++ Can determine who restricted, who is none restricted?
How can i solve the problem here? Please help me, or else please give me another solution to do it.
Thank you very much.
|
|
|
04-01-2005, 10:43 AM
|
#7
|
Member
Registered: Feb 2004
Posts: 273
Rep:
|
Explain clearly what you wish to achieve?
|
|
|
04-03-2005, 10:48 PM
|
#8
|
Member
Registered: Mar 2005
Posts: 146
Original Poster
Rep:
|
Quote:
Explain clearly what you wish to achieve?
|
The clients in my localnetwork usually download big files or big software. This matter can be solved by deny file type (ex: .exe, .zip, .rar, .rpm,..), however some software and files rather small and they will be served client's working purpose. The same point is under 2MB. So, i want to restrict files over 2MB request from clients.
How can i do it? I have also used "reply_body_max_size", however it can not work right, even i surf web, everything is denied.
Please help me solve the problem.
|
|
|
04-22-2010, 02:41 AM
|
#9
|
LQ Newbie
Registered: Apr 2010
Posts: 1
Rep: 
|
reply_body_max_size
reply_body_max_size not working for https sites
can anybody help me?
|
|
|
All times are GMT -5. The time now is 03:23 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|