LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-19-2014, 07:50 AM   #1
diablo046
LQ Newbie
 
Registered: Jun 2014
Posts: 21

Rep: Reputation: Disabled
Smile How to control Upload Limit in Squid Proxy server 3.1


Hi All,

Please suggest me how to limit upload in squid server. I dont want to limit the download.
I have used following configuration

request_body_max_size 1024 KB ( I want to limit Upload to 1 MB )

external_acl_type request_body %{Content-Length} /usr/bin/upload.sh
acl uploadlmt external request_body 1024000
http_access allow uploadlmt
http_access deny all

The script configuration of the upload.sh is as follows..

#!/bin/sh
while read size limit; do
if [ "${size}" -gt "${limit}" ]; then
echo ERR
else
echo OK
fi
done

But with all these configuration I am not able to control the uploading of clients. Please help. Thanks in advance
 
Old 06-23-2014, 11:08 AM   #2
Andy Alt
Member
 
Registered: Jun 2004
Location: Minnesota, USA
Distribution: Slackware32-stable, Debian32 stable, LFS 7.1
Posts: 385

Rep: Reputation: 44
Here's one suggestion:

http://serverfault.com/questions/548...h-squid-server
 
Old 07-01-2014, 04:14 AM   #3
diablo046
LQ Newbie
 
Registered: Jun 2014
Posts: 21

Original Poster
Rep: Reputation: Disabled
Found the little problem :)

Thank You Andy.

Well the first command actually solved my problem.
request_body_max_size 1024 KB.
It actually limit the upload size of file.But not in every uploader site such as sendspace,wetransfer etc.I was checking in these sites by uploading large file, but it was invain.But the I checked in http://www.freeuploadsite.com/ site by uploading files and its
100% working.I can limit uploading in squid config and check in the above mentioned site whether its working or not perfectly.
Since I am new to linux,I was not properly guided . Any ways now I will try to limit uploading for other sites like Sendspace, WeTransfer which gave me so much headache..Thank You all.
 
  


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
how to limit downloading in squid proxy. Hira Inam Linux - Newbie 26 08-21-2012 01:43 PM
How to limit downloading in squid proxy. Hira Inam Linux - Server 1 08-08-2012 04:06 AM
limit the upload size for specific domain in squid kalidoss Linux - Server 0 10-24-2009 01:11 AM
[SOLVED] Not able to upload videos to youtube using the Squid proxy server chandramani_yadav Linux - Server 4 08-13-2009 02:26 AM
No able to Upload file to FTP serve using squid proxy simplyrahul Linux - General 2 02-16-2005 04:01 PM


All times are GMT -5. The time now is 04:16 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration