limit bandwidth

19 posts / 0 new
Last post
#1 Tue, 10/21/2008 - 07:56

limit bandwidth


How can I limit server bandwidth (100mbs) without using QoS of router? Do you know some softwares or can virtualmin/webmin do it?

Tue, 10/21/2008 - 08:49

Well, what's your goal -- what problem are you attempting to solve?

Are you trying to limit total bandwidth during any given month?

Are you trying to limit the size of your pipe -- perhaps to slow down "leeching" from spiders or similar?

The specific problem you're trying to solve would effect how you might go about this -- as well as how easy it'd be to implement ;-)

Thu, 11/06/2008 - 23:57 (Reply to #2)

Inside virtualmin admin panel there is the option for Bandwidth Monitoring under the System Settings.
Inside it mentions bandwidth limits for individual servers.
Can somebody tell me how this works and where these limits can be defined ?
Is this related to this discussion ?

Many thanks and best regards to all.

Fri, 11/07/2008 - 01:46 (Reply to #3)

.....hmmm...some additional questions please if I may:

Since /etc/webmin/virtual-server/ is running (I guess this is the bandwidth tool (?) ), I get every couple of minutes a change in all the signature of the domain files:
Integrity checksum changed for: '/etc/webmin/virtual-server/domains/122207224026825'

Is it normal ?

Thanks again so much

Sat, 11/22/2008 - 06:55 (Reply to #4)

<div class='quote'>EasyApache Bandwidth Module

The module used for limiting bandwidth usage differs depending on the branch of apache you are using. The modules that are used are:

* Apache 1.3.x - mod_bandwidth - from
* Apache 2.x - mod_bw - from

Both Apache branches use /scripts/setbwlimit to modify the bandwidth limits for specific virtualhosts. See /scripts/setbwlimit --help (after you compile Apache with the module) for more information.</div>

It's mod_bw, but the Release Date is 17-03-2007

<div class='quote'>Apache2 - Mod_bw v0.8

Author : Ivan Barrera A. (Bruce)

HomePage : Http://

Release Date : 17-03-2007

Status : Stable

License : Licensed under the Apache Software License v2.0
It must be included as LICENSE in this package.

Platform : Linux/x86 (Tested with Fedora Core 4, Suse, etc)
Linux/x86_64 (Redhat Enterprise 4)
FreeBSD/x86 (Tested on 5.2)
MacOS X/Ppc x86 (Tested on both platforms)
Solaris 8/sparc (Some notes on compile)
Microsoft Windows (Win XP, Win2003. Others should work)
HP-UX 11 (Thanks to Soumendu Bhattacharya for testing)

Notes : This is a stable version of mod_bw. It works fine with
almost any MPM (tested with WinNT/prefork/Worker MPM).

Limitations : This mod doesn't know how fast is the client really
downloading a file, so it just divides the bw assigned
between the users.
MaxConnections works only for the given scope. (i.e , all
will limit maxconnections from all,not per ip or user)</div>

It's not a close project.

Wed, 10/22/2008 - 02:52

No, I'd like to limit the connection of some servers, not using QoS of cisco router but only with a software. Is it possible?

Wed, 10/22/2008 - 06:05 (Reply to #6)

It sounds like you're saying you'd like to limit the available &quot;pipe&quot; to certain Virtual Servers (domains) -- not the total monthly bandwidth, but how much bandwidth can be used at any one time.

I'm aware of three modules that were made as an attempt to solve that problem (none of which are directly supported by Virtualmin and all of which will require manual compilation and installation ;-) -- mod_throttle, mod_cband, and mod_bw.

The first, mod_throttle, is now defunct and no longer available.

I don't have any experience with the other two, but there's plenty of documentation out there on how to get them up and running. From what I can tell, neither have had releases since 2005/2006, but both appear to work in Apache 2.

Sun, 11/02/2008 - 01:26 (Reply to #7)

It will be good if virtualmin supports them :)

Sun, 11/02/2008 - 08:38 (Reply to #8)

Well, that functionality would indeed be cool.

That's a tough proposition though -- since none of those modules are actually being developed anymore, it's tough for something like Virtualmin to support them.

As soon as folks got used to it being there, a new version of Apache could come out, breaking compatibility with those modules. And people don't like it when things that once work suddenly stop :-)

Sun, 11/02/2008 - 13:16 (Reply to #9)
Joe's picture

As Eric mentioned, we simply can't support abandoned, non-core, Apache modules.

We're contemplating (with much trepidation) adding support for mod_gnutls, in order to get multi-domain certificate support. But it's been in active development for several years, has a lot of users, and is not abandoned. And, also, seems like a likely candidate for official inclusion in Apache at some point in the future.

But, even thinking about supporting that one makes it a little harder for me to sleep at night (knowing that if it is abandoned in the future, I'm screwed and will have to figure out a way for us to fund continuing maintenance on it).


Check out the forum guidelines!

Mon, 11/03/2008 - 09:22

and if I want to limit all server's bandwidth (for apache, ftp sever, email server...)? Is it possible?

Thank you very much

Mon, 11/03/2008 - 12:15 (Reply to #11)

It's possible, but it's not necessarily simple :-)

You may want to look into traffic shaping and rate limiting.

First, I know you were looking to avoid this, but it's going to be much more straight forward if your ISP does this for you on their end, the routers they have setup probably make this all fairly easy to do.

That said, if you want to explore doing it on your box, examples such as these might help you get started:

Also, Shorewall is a tool that makes setting up firewalls and traffic shaping a bit simpler, you might find it more straight forward than using the above directly:

I haven't done much at all with any of this, I'm just pointing out some resources if you're really eager to be able to do this from your own box :-)

Have a good one,

Wed, 11/05/2008 - 07:13 (Reply to #12)

you don't advice me to install shorewall on a real server?

Wed, 11/05/2008 - 08:01 (Reply to #13)

You asked if limiting bandwidth on ones server is possible -- all of the above options are viable solutions to that problem -- including Shorewall.

My &quot;advice&quot; is to get your ISP to perform your bandwidth limiting :-)

Everything else I'm mentioning are purely thoughts and ideas that might help you accomplish what you're asking.

However, having a router outside of your own box performing the rate limiting is the best and simplest solution.

Fri, 11/07/2008 - 02:32

all you see in Bandwidth Usage is to be consider traffic usage.

Fri, 11/07/2008 - 04:31 (Reply to #15)

Yeah, the bandwidth monitoring measures how much web, email, and ftp traffic has been utilized in a given time period (typically a month).

If a customer goes over their limit, you can set it up to disable their Virtual Server if you like.

And yeah, collects the bandwidth usage stats seen in the Bandwidth Monitoring section. I'm guessing the changes you're seeing in those files is due to that -- it has to save all that information each time it runs.

Fri, 11/07/2008 - 06:05 (Reply to #16)

May I ask how (where in the virtulmin interface) can I set these bandwidth limits per server ?
I cannot find anything like that...

Fri, 11/07/2008 - 08:04 (Reply to #17)

When you log into Virtualmin, choose &quot;Edit Virtual Server&quot;, then go into &quot;Quotas and limits&quot;.

You'll see &quot;Bandwidth limit&quot; listed there.

Sat, 11/22/2008 - 06:33 (Reply to #18)

Generally on Cpanel's servers I see this
Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.7a mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/ PHP/5.2.6 Server at Port 80

What's mod_bwlimited?. It seems to be opensource.

Topic locked