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 |
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.
|
 |
10-03-2016, 12:44 PM
|
#1
|
LQ Newbie
Registered: Oct 2016
Posts: 6
Rep: 
|
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 
|
|
|
10-04-2016, 04:26 PM
|
#2
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,220
|
Quote:
Originally Posted by Y_Sam
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.
|
10-04-2016, 04:33 PM
|
#3
|
Senior Member
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278
|
|
|
1 members found this post helpful.
|
10-05-2016, 01:18 AM
|
#4
|
LQ Newbie
Registered: Oct 2016
Posts: 6
Original Poster
Rep: 
|
Quote:
Originally Posted by bathory
|
Quote:
Originally Posted by szboardstretcher
|
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.
|
|
|
10-12-2016, 03:18 PM
|
#5
|
LQ Newbie
Registered: Oct 2016
Posts: 6
Original Poster
Rep: 
|
anyone ?
|
|
|
10-13-2016, 08:44 AM
|
#6
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,220
|
Quote:
Originally Posted by Y_Sam
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
|
|
|
10-13-2016, 11:58 AM
|
#7
|
Senior Member
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278
|
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.
|
|
|
10-15-2016, 08:13 AM
|
#8
|
LQ Newbie
Registered: Oct 2016
Posts: 6
Original Poster
Rep: 
|
Quote:
Originally Posted by bathory
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
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
|
|
|
10-16-2016, 01:05 PM
|
#9
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,220
|
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
|
|
|
All times are GMT -5. The time now is 06:13 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
|
|