Mainmenu
Language
German
English
French
Who's online
MEMBERS ONLINE
Currently no members online.

You are an anonymous user. You can register for free by clicking here
Lost password?
Get new password
User name
Password
 Remember me
Search
 
FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
MaximizeMaximize  
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
Blacky
Primary Master
Primary Master


Joined: Apr 19, 2003
Posts: 312

Post   Posted: Jan 06, 2005 - 12:09 PM Reply with quote Back to top

This is a further developed version of mod_bandwidth that you'll find at http://www.cohprog.com/mod_bandwidth.html

I added a MaxConnectionPerIP directive, so you can limit the maximum connection each particular IP is allowed to open to your Directory, Server or Virtual Server directive you've defined in your httpd.conf.

It's especially useful to prevent leechers from leeching with a lot of connections to rip other downloaders bandwidth and wasting apache connections.

This was the primary reason that I needed it for. I had tried mod_limitipconn, but wondered, why it blocks a directory or virtual server that was set to 1 connection, if there were current connections to other directories or virtual servers where no limit was set. I checked the code, and knew why. mod_limitipconn counts all of apaches concurrent connections for a specific IP! Independent of the directory or virtual server. So it was useless for my purpose and because I already loved mod_bandwidth, I thought: Hey, do you first open source submit. Smile

Below you can download mod_bandwidth_206.tar.bz2 which includes only the updated mod_bandwidth.c file. Grab all other and documentation from http://www.cohprog.com/mod_bandwidth.html.

Notice: You've to create an additional directory for the connection data (/tmp/apachebw/conn), even if you've already setup a previous version of mod_bandwidth! See also point 3) of the instructions in mod_bandwidth.c

Hope you'll find this new directive (MaxConnectionPerIP) as useful as I do.
Remember: Keep the leechers dry. Very Happy

Description from the source:
Code:
 * -  MaxConnectionPerIP
 *    Syntax  : MaxConnectionPerIP <domain|ip|all> <connections>
 *    Default : 0 (illimited)
 *    Context : per directory, .htaccess
 *
 *    Restrict the number of maximum simultanous connections per IP from IP/Host or all.
 *    Whereas the meaning of "all" is "each".
 *    Example : MaxConnectionPerIP all 1
 *              This will restrict each IP to max 1 connection at a time.
 *    If the limit is reached, new connections will be rejected.
 *    You can combine this with MaxConnection to set a general connection limit
 *
 *    A value of 0 means that there isn't any limits.


Latest changes:
Code:
 * 10/25/04 - Add MaxConnectionPerIP directive to limit the
 *            number of simultaneous connections per IP
 *            You've to create a directory for the connection data
 *            /tmp/apachebw/conn, also see point 3) below
 *            Added by Michael Ritter <xxx@xxx.xx> (Real in the source)
 *            http://www.hdtvtotal.com/mod_bandwidth.html



mod_bandwidth_206.tar.bz2
 Description:
mod_bandwidth 2.0.6

Download
 Filename:  mod_bandwidth_206.tar.bz2
 Filesize:  12.16 KB
 Downloaded:  1348 Time(s)


_________________
Image
-=] Hardware für Wahnsinnige | Hardware for insanes [=-


Last edited by Blacky on Jun 18, 2005 - 11:32 AM; edited 4 times in total
View user's profile Send private message Visit poster's website
Spacer
tenka
TV Newbie
TV Newbie


Joined: May 12, 2005
Posts: 1

Post   Posted: May 12, 2005 - 03:25 PM Reply with quote Back to top

hi everybody ,

i found this module for apache and i thank the creator because i was looking for this directive everywhere.
I just have some prob to implement it.i was used to mod_bandwidth but this version isn't working.
i still can download to full bandwidth and any simultaneous files that i want.

thanks in advance for you help.
View user's profile Send private message
Spacer
Spacer
Blacky
Primary Master
Primary Master


Joined: Apr 19, 2003
Posts: 312

Post   Posted: Jun 18, 2005 - 11:00 AM Reply with quote Back to top

Okay, got the time to test my version with the latest apache 1.3.x, and found no problem so far.

Maybe you didn't create the directory for the connection data?
/tmp/apachebw/conn

Code:

 * 3) Create the following directories with "rwx" permission to everybody :
 *    (or rwx for the user under which Apache run : Usualy "nobody")
 *    /tmp/apachebw
 *    /tmp/apachebw/link
 *    /tmp/apachebw/master
 *    /tmp/apachebw/conn


I'll make this info more visible, as a lot of people, that're already used to mod_bandwidth, will probably miss this point, because they will asume that everything is already setup the right way from the previous version.

I hope you got/get it working, please let me know.

_________________
Image
-=] Hardware für Wahnsinnige | Hardware for insanes [=-
View user's profile Send private message Visit poster's website
Display posts from previous:     
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 1.2f © 2003-2004 PNphpBB Group
Credits

Copyright 2004 - 2008 | HDTVTotal.com | Impressum
Page created in 2.15836501122 seconds.

Fotografie Panoramen Webentwicklung
zypo|solutionz - fotografie panoramen webentwicklung euskirchen/köln/bonn - logo