LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-01-2005, 01:50 AM   #1
b:z
Member
 
Registered: Mar 2005
Posts: 146

Rep: Reputation: 15
Exclamation 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.
 
Old 04-01-2005, 02:10 AM   #2
overlord73
Member
 
Registered: Apr 2004
Location: ..where no life dwells..
Posts: 541

Rep: Reputation: 30
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
 
Old 04-01-2005, 02:36 AM   #3
b:z
Member
 
Registered: Mar 2005
Posts: 146

Original Poster
Rep: Reputation: 15
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.
 
Old 04-01-2005, 04:27 AM   #4
b:z
Member
 
Registered: Mar 2005
Posts: 146

Original Poster
Rep: Reputation: 15
Everybody, please help me.
I also refer SQUID document on squid-cache.org.
 
Old 04-01-2005, 07:32 AM   #5
linuxxed
Member
 
Registered: Feb 2004
Posts: 273

Rep: Reputation: 30
Look at reply_body_max_size

http://euler.aero.iitb.ac.in/docs/we...4s1/tuning.htm
 
Old 04-01-2005, 08:52 AM   #6
b:z
Member
 
Registered: Mar 2005
Posts: 146

Original Poster
Rep: Reputation: 15
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.
 
Old 04-01-2005, 10:43 AM   #7
linuxxed
Member
 
Registered: Feb 2004
Posts: 273

Rep: Reputation: 30
Explain clearly what you wish to achieve?
 
Old 04-03-2005, 10:48 PM   #8
b:z
Member
 
Registered: Mar 2005
Posts: 146

Original Poster
Rep: Reputation: 15
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.
 
Old 04-22-2010, 02:41 AM   #9
ashokncse
LQ Newbie
 
Registered: Apr 2010
Posts: 1

Rep: Reputation: Disabled
reply_body_max_size

reply_body_max_size not working for https sites
can anybody help me?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
squid proxy server configuration & distribution of internet without proxy gaurav_gupta082 Linux From Scratch 2 07-31-2010 11:25 AM
restrict internet bandwidth using squid coolamit78 Linux - Networking 2 08-15-2009 12:50 AM
configure squid proxy with microsoft proxy as a parent proxy nintykola Linux - Software 1 08-28-2007 01:38 AM
restrict access using squid, iptables? jgnasser Linux - Networking 3 04-13-2005 07:21 AM
Restrict web access using proxy in redhat 9 xeondavis Linux - Security 1 12-15-2003 03:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration