Forum: NGINX Limit downlaod speed per ip

Posted by shahzaib mushtaq (shahzaib12)
on 2013-01-24 18:52
(Received via mailing list)
Hello,

       Is there a way to limit speed per ip ? Doesn't matter how many
connections the single ip is consuming but he shouldn't be able to get 
more
than assigned download limit.

limit_rate directive is for per connection but not for per ip.

Looking forward to your help. Thanks
Posted by Piotr Karbowski (Guest)
on 2013-01-24 18:59
(Received via mailing list)
On 01/24/2013 06:52 PM, shahzaib shahzaib wrote:
> Hello,
>
>         Is there a way to limit speed per ip ? Doesn't matter how many
> connections the single ip is consuming but he shouldn't be able to get more
> than assigned download limit.
>
> limit_rate directive is for per connection but not for per ip.
>
> Looking forward to your help. Thanks

You need to do it on system level, like tc on linux or ipfw on freebsd
and so on.

-- Piotr.
Posted by shahzaib mushtaq (shahzaib12)
on 2013-01-24 19:03
(Received via mailing list)
Can you explain a bit ? We are using Centos 6.3.
Posted by Patrick Lists (Guest)
on 2013-01-24 20:12
(Received via mailing list)
On 01/24/2013 07:02 PM, shahzaib shahzaib wrote:
> Can you explain a bit ? We are using Centos 6.3.

$ man tc

http://linux-ip.net/articles/Traffic-Control-HOWTO/

Regards,
Patrick
Posted by Weibin Yao (yaoweibin)
on 2013-01-25 04:40
(Received via mailing list)
I used to write a simple module for such purpose, It should work. Have a
try: https://github.com/yaoweibin/nginx_limit_speed_module

2013/1/25 Patrick Lists <nginx-list@puzzled.xs4all.nl>
Posted by shahzaib mushtaq (shahzaib12)
on 2013-01-25 17:05
(Received via mailing list)
Thanks guyz, i'll look into your module, if it works for me and will let
you know about that :)
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.