Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-04-18, 08:53:02

Author Topic: Limiting bandwidth?  (Read 8267 times)

0 Members and 1 Guest are viewing this topic.

Offline Viking

  • Senior Member
  • *
  • Posts: 315
  • Karma: +0/-0
    • View Profile
Limiting bandwidth?
« on: 2013-02-16, 00:31:15 »
How can the user or domain bandwidth. For example, to limit a user or domain specific bandwidth of 10GB/s to 5gb/s?
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Limiting bandwidth?
« Reply #1 on: 2013-02-16, 06:54:29 »
Only able per-user. Click 'Limit' on panel but better set when creating 'resource plan'.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Viking

  • Senior Member
  • *
  • Posts: 315
  • Karma: +0/-0
    • View Profile
Re: Limiting bandwidth?
« Reply #2 on: 2013-02-16, 21:17:06 »
Quote from: "MRatWork"
Only able per-user. Click 'Limit' on panel but better set when creating 'resource plan'.
Where is the option to limit the speed of the link because I can not find it?
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Limiting bandwidth?
« Reply #3 on: 2013-02-16, 21:36:20 »
No limit bandwidth but quota/month per-client.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Viking

  • Senior Member
  • *
  • Posts: 315
  • Karma: +0/-0
    • View Profile
Re: Limiting bandwidth?
« Reply #4 on: 2013-02-16, 22:25:05 »
Quote from: "MRatWork"
No limit bandwidth but quota/month per-client.
This is a monthly limit. I ask you to limit the speed of internet user (X MB/s).
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Limiting bandwidth?
« Reply #5 on: 2013-02-16, 23:27:20 »
Quote from: "Viking"
Quote from: "MRatWork"
No limit bandwidth but quota/month per-client.
This is a monthly limit. I ask you to limit the speed of internet user (X MB/s).
My question is how to limition speed?. Do you have information or link about it?.

It's more hard rather than limition vps by host because limition able detect/config via vps ips.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Viking

  • Senior Member
  • *
  • Posts: 315
  • Karma: +0/-0
    • View Profile
Re: Limiting bandwidth?
« Reply #6 on: 2013-02-16, 23:48:20 »
Quote from: "MRatWork"
Quote from: "Viking"
Quote from: "MRatWork"
No limit bandwidth but quota/month per-client.
This is a monthly limit. I ask you to limit the speed of internet user (X MB/s).
My question is how to limition speed?. Do you have information or link about it?.

It's more hard rather than limition vps by host because limition able detect/config via vps ips.

OK. Here topics about what I'm asking:
http://forum.lxcenter.org/index.php?t=m ... #msg_32512
http://forum.directadmin.com/showthread.php?t=45189
Just as practically used in Kloxo-MR?
Now I understand what I'm asking?
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Limiting bandwidth?
« Reply #7 on: 2013-02-17, 01:03:36 »
Nginx have built-in bandwidth limitation. Read http://wiki.nginx.org/HttpLimitReqModule
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Viking

  • Senior Member
  • *
  • Posts: 315
  • Karma: +0/-0
    • View Profile
Re: Limiting bandwidth?
« Reply #8 on: 2013-02-17, 01:50:32 »
Quote from: "MRatWork"
Nginx have built-in bandwidth limitation. Read http://wiki.nginx.org/HttpLimitReqModule
OK. I'll do the test. But how to use Kloxo-MR for 1 user or domain?
Where and how do I insert?
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Limiting bandwidth?
« Reply #9 on: 2013-02-17, 01:55:32 »
Modified custom.domains.conf.tpl inside /home/nginx/tpl.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Viking

  • Senior Member
  • *
  • Posts: 315
  • Karma: +0/-0
    • View Profile
Re: Limiting bandwidth?
« Reply #10 on: 2013-02-17, 02:16:25 »
Quote from: "MRatWork"
Modified custom.domains.conf.tpl inside /home/nginx/tpl.
I know nginx poorly so if you would write as correctly put it asked me to show you how.
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Limiting bandwidth?
« Reply #11 on: 2013-02-17, 07:41:46 »
Ok, you can try with:

1. Modified /home/nginx/etc/conf.d/custom.~lxcenter.conf:
Code: [Select]
...
    limit_conn_zone $binary_remote_addr zone=addr:10m;
...
to:
Code: [Select]
...
    limit_conn_zone $binary_remote_addr zone=addr:10m;
    limit_req_zone  $server_name  zone=one:10m rate=100r/s;
...

2. /home/nginx/tpl/custom.domains.conf.tpl
Code: [Select]
...
## web for '<?php echo $domainname?>'
server {
    listen <?php echo $ip?>:<?php echo $port?>;
<?php
        
if ($count !== 0) {
?>

...

to:

for limitation for domain 'level'
Code: [Select]
...
## web for '<?php echo $domainname?>'
server {
    listen <?php echo $ip?>:<?php echo $port?>;

<?php
    
if ($domainname === 'yourdomain.com') {
?>

    limit_req one;
<?php
    
}
?>

<?php
        
if ($count !== 0) {
?>

...

or:
for limitation for user 'level'
Code: [Select]
...
## web for '<?php echo $domainname?>'
server {
    listen <?php echo $ip?>:<?php echo $port?>;

<?php
    
if ($user === 'admin') {
?>

    limit_req one;
<?php
    
}
?>

<?php
        
if ($count !== 0) {
?>

...
Adjustment value of 'rate=100r/s' (permit 100 request/second) and 'yourdomain.com' (just example yourdomain.com is domain you want to limitation) or 'admin'.

Don't forget running 'sh /script/fixweb; service nginx restart' after that.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Viking

  • Senior Member
  • *
  • Posts: 315
  • Karma: +0/-0
    • View Profile
Re: Limiting bandwidth?
« Reply #12 on: 2013-02-17, 08:29:14 »
Quote from: "MRatWork"
Ok, you can try with:

1. Modified /home/nginx/etc/conf.d/custom.~lxcenter.conf:
Code: [Select]
...
    limit_conn_zone $binary_remote_addr zone=addr:10m;
...
to:
Code: [Select]
...
    limit_conn_zone $binary_remote_addr zone=addr:10m;
    limit_req_zone  $server_name  zone=one:10m rate=100r/s;
...

2. /home/nginx/tpl/custom.domains.conf.tpl
Code: [Select]
...
## web for '<?php echo $domainname?>'
server {
    listen <?php echo $ip?>:<?php echo $port?>;
<?php
        
if ($count !== 0) {
?>

...

to:

for limitation for domain 'level'
Code: [Select]
...
## web for '<?php echo $domainname?>'
server {
    listen <?php echo $ip?>:<?php echo $port?>;

<?php
    
if ($domainname === 'yourdomain.com') {
?>

    limit_req one;
<?php
    
}
?>

<?php
        
if ($count !== 0) {
?>

...

or:
for limitation for user 'level'
Code: [Select]
...
## web for '<?php echo $domainname?>'
server {
    listen <?php echo $ip?>:<?php echo $port?>;

<?php
    
if ($user === 'admin') {
?>

    limit_req one;
<?php
    
}
?>

<?php
        
if ($count !== 0) {
?>

...
Adjustment value of 'rate=100r/s' (permit 100 request/second) and 'yourdomain.com' (just example yourdomain.com is domain you want to limitation) or 'admin'.

Don't forget running 'sh /script/fixweb; service nginx restart' after that.
MRatWork thank you. For you can always count on and not revived anyone looking for somewhere to on other forums or in google like everyone else. How to check what you've written.
« Last Edit: 1970-01-01, 01:00:00 by Guest »

 


Top 10 Social Networking:    Facebook    Twitter    LinkedIn    Pinterest    Google Plus    Tumblr    Instagram    VK    Flickr    Vine

Page created in 0.081 seconds with 21 queries.

web stats analysis