LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 10-03-2016, 12:44 PM   #1
Y_Sam
LQ Newbie
 
Registered: Oct 2016
Posts: 6

Rep: Reputation: Disabled
Wink Squid speed limit


Hi all,


I've configured squid3 on my Ubuntu-14.04-x86 server.
I want to limit speed limit for each ip 300kbps (i don't have a list of ips. just want to limit everyone who connects)

Also max speed for all users 5mbps

Thank you
 
Old 10-04-2016, 04:26 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,520

Rep: Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502
Quote:
Originally Posted by Y_Sam View Post
Hi all,


I've configured squid3 on my Ubuntu-14.04-x86 server.
I want to limit speed limit for each ip 300kbps (i don't have a list of ips. just want to limit everyone who connects)

Also max speed for all users 5mbps

Thank you
Try delay pools
 
1 members found this post helpful.
Old 10-04-2016, 04:33 PM   #3
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,816

Rep: Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346
Squid documentation on delay pools:

http://wiki.squid-cache.org/Features/DelayPools
 
1 members found this post helpful.
Old 10-05-2016, 01:18 AM   #4
Y_Sam
LQ Newbie
 
Registered: Oct 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Quote:
Originally Posted by szboardstretcher View Post
Squid documentation on delay pools:

http://wiki.squid-cache.org/Features/DelayPools
Thank you both

I've tested this its working fine.
#max speed 5mbps
delay_pools 1
delay_class 1 1
delay_access 1 allow all
delay_parameters 1 640000/640000

It's not working when I limit speed for each connection. I've tried replacing "192.168.1.0/24" with my server ip. But still struggling

acl only128kusers src 192.168.1.0/24
delay_pools 1
delay_class 1 3
delay_access 1 allow only128kusers
delay_access 1 deny all
delay_parameters 1 640000/640000 -1/-1 16000/640000

Please help me with that?

Last edited by Y_Sam; 10-05-2016 at 12:14 PM.
 
Old 10-12-2016, 03:18 PM   #5
Y_Sam
LQ Newbie
 
Registered: Oct 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
anyone ?
 
Old 10-13-2016, 08:44 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,520

Rep: Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502
Quote:
Originally Posted by Y_Sam View Post
anyone ?
We have pointed you out that you have to use delay pools in squid. Now it's up to you to read the documentation and implement it, so squid does what you want.

If the above example doesn't work, check squid logs for errors and use your favorite search engine for a solution, or to find another howto that fits your needs.


Regards
 
Old 10-13-2016, 11:58 AM   #7
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,816

Rep: Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346
Your configuration looks close. However, if you changed that IP SUBNET to your IP ADDRESS then you would only be limiting yourself. You would want to put in a SUBNET which contains the IP ADDRESSES that you want to limit. Ie:

192.168.100.0/24 or 10.0.1.0/23

Also, you changed the pool parameters to 640000, which is far more bandwidth than you think.

Last edited by szboardstretcher; 10-13-2016 at 12:00 PM.
 
Old 10-15-2016, 08:13 AM   #8
Y_Sam
LQ Newbie
 
Registered: Oct 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
We have pointed you out that you have to use delay pools in squid. Now it's up to you to read the documentation and implement it, so squid does what you want.

If the above example doesn't work, check squid logs for errors and use your favorite search engine for a solution, or to find another howto that fits your needs.


Regards
I read whole doc. I know I'm close but still unable to do it.

Quote:
Originally Posted by szboardstretcher View Post
Your configuration looks close. However, if you changed that IP SUBNET to your IP ADDRESS then you would only be limiting yourself. You would want to put in a SUBNET which contains the IP ADDRESSES that you want to limit. Ie:

192.168.100.0/24 or 10.0.1.0/23

Also, you changed the pool parameters to 640000, which is far more bandwidth than you think.
ah that 640000 just for testing. I can change it anytime.

I want to apply these limits to everyone who connects to my server. I can't specify by ip or subnet. It can be any country. There are tons of subnets.
How could I do that?

Thank you very much for the support
 
Old 10-16-2016, 01:05 PM   #9
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,520

Rep: Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502
Quote:
I want to apply these limits to everyone who connects to my server. I can't specify by ip or subnet. It can be any country. There are tons of subnets.
How could I do that?
I have never used delay-pools, but I guess you may try the following:
Code:
delay_pools 1
delay_class 1 3
delay_access 1 allow all
delay_parameters 1 640000/640000 -1/-1 16000/640000
 
  


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
Speed limit Itaaki Linux - Networking 2 01-21-2011 05:51 AM
Limit speed X.Cyclop Linux - Wireless Networking 3 12-18-2010 01:56 PM
Limit speed for slackpkg slackass Slackware 2 08-21-2009 07:23 PM
Upstream speed - How do I limit ? overproof Linux - Networking 1 04-23-2005 10:31 AM
How to limit upload speed for IP? wild_beast Linux - Networking 4 11-18-2003 02:14 AM


All times are GMT -5. The time now is 12:47 PM.

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