Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Nov 2006
    Posts
    3

    Question Limit connections per ip

    I'm new user of cPanel with RHE v4 and Apapche 1.3.

    I'm going to start a membership movie site and want to limit connections to video
    files per ip because they give a server heavy load.

    I knew there was a module to enable this configurations but the link has gone now.
    http://dominia.org/djao/limitipconn.html
    This module enabled that only 1 access was allowed per one ip at the same time.

    Does anyone know the module to enable it?

    Any advise would be appreciated.

    Thank you.

    surfweb

  2. #2
    Member sssathish's Avatar
    Join Date
    Jul 2006
    Location
    Madurai, Tamil Nadu, India
    Posts
    22

    Default

    Hi,

    Installing mod_limitipconn.c

    This is the apache module mod_limitipconn.c, which
    allows web server administrators to limit the number of simultaneous downloads permitted from a single IP address.

    =================
    Log into ssh

    cd /usr/src
    wget http://dominia.org/djao/limit/mod_li...nn-0.04.tar.gz
    tar xzvf mod_limitipconn-0.04.tar.gz
    cd mod_limitipconn-0.04

    pico Makefile
    find the line that reads APXS=apxs[/b]
    change that to
    APXS=/usr/local/apache/bin/apxs

    press cntrl O to save
    then cntrl X

    // if your locations to apxs is different
    locate apxs and copy the path
    then paste that in
    //

    make
    make install

    service httpd restart

    pico -w /etc/httpd/conf/httpd.conf

    locate ExtendedStatus
    Make sure ExtendedStatus is on and without the comment at the start

    and add this line to every virtual directory you want to limit
    or add it once to the main directory to limit all

    <IfModule mod_limitipconn.c>
    <Location /somewhere>
    MaxConnPerIP 3
    # exempting images from the connection limit is often a good
    # idea if your web page has lots of inline images, since these
    # pages often generate a flurry of concurrent image requests
    NoIPLimit image/*
    </Location>

    <Location /mp3>
    MaxConnPerIP 1
    # In this case, all MIME types other than audio/mpeg and video*
    # are exempt from the limit check
    OnlyIPLimit audio/mpeg video
    </Location>
    </IfModule>

    press cntrl O to save
    then cntrl X
    then service httpd restart

  3. #3
    Registered User
    Join Date
    Nov 2006
    Posts
    3

    Unhappy Re: mod_limitipconn.c

    Hello,

    Thank you for explaining in detail for me.
    Unfortunately this site seems to be down.

    http://dominia.org/djao/limit/mod_li...nn-0.04.tar.gz

    Could you upload somewhere this module or sent me by email if you have?

    I need mod_limitipconn.c for Apache 1.3 and 2.0.
    Here is an original google cache links:
    http://www.google.com/search?q=cache...d=1&lr=lang_en
    http://www.google.com/search?q=cache...p&ct=clnk&cd=1

    but cannot download the module at all.

    surfweb
    Last edited by surfweb; 11-15-2006 at 08:33 AM.

  4. #4
    Member sssathish's Avatar
    Join Date
    Jul 2006
    Location
    Madurai, Tamil Nadu, India
    Posts
    22

    Default

    Hi,

    The url which i mentioned in my previous post was accessing fine. ok leave that . Here i have mentioned below the same url but another link to download the mod_limitipconn. You can use this for both apache 1.3 and 2.0


    http://dominia.org/djao/limit/mod_li...nn-0.22.tar.gz


  5. #5
    Registered User
    Join Date
    Nov 2006
    Posts
    3

    Smile

    Quote Originally Posted by sssathish View Post
    Hi,

    The url which i mentioned in my previous post was accessing fine. ok leave that . Here i have mentioned below the same url but another link to download the mod_limitipconn. You can use this for both apache 1.3 and 2.0


    http://dominia.org/djao/limit/mod_li...nn-0.22.tar.gz

    Hello,

    I appreciate you from my heart!
    And http://dominia.org/djao/ has been back now.

    http://dominia.org/djao/limit/mod_li...nn-0.22.tar.gz
    seems to work only with Apache 2.0.
    http://dominia.org/djao/limitipconn2.html

    Does mod_limitipconn-0.22.tar.gz work with Apache 1.3 too as
    http://dominia.org/djao/limit/mod_li...nn-0.04.tar.gz ?

    http://dominia.org/djao/limitipconn.html

    Thank you.

  6. #6
    Member
    Join Date
    Oct 2006
    Posts
    11

    Default

    How can I check that this is really working? Apache is running after installation so the configuration should be ok but I can't see no restrictions of connections.

    I tried to simply catch everything using FlashGet and netstat showed me 85 open tcp connections.

    I am using 3 connections limit..

  7. #7
    Member
    Join Date
    Oct 2006
    Posts
    11

    Default

    It is not working for me. This if from the httpd.conf:

    <VirtualHost 127.0.0.1>
    ServerAlias domain.com
    ServerAdmin webmaster@domain.com
    DocumentRoot /home/eio982/public_html
    BytesLog domlogs/domain.com-bytes_log
    <IfModule mod_userdir.c>
    UserDir disabled
    UserDir enabled eio982
    </IfModule>
    ServerName www.domain.com

    <IfModule mod_limitipconn.c>
    <Location /home/eio982/public_html>
    MaxConnPerIP 3
    # exempting images from the connection limit is often a good
    # idea if your web page has lots of inline images, since these
    # pages often generate a flurry of concurrent image requests
    NoIPLimit image/*
    </Location>


    </IfModule>

    User eio982
    Group eio982
    CustomLog /usr/local/apache/domlogs/domain.com combined
    ScriptAlias /cgi-bin/ /home/eio982/public_html/cgi-bin/
    </VirtualHost>
    IP and domain name was changed..

  8. #8
    Member
    Join Date
    Dec 2002
    Posts
    39

    Default

    Does anyone know if cpanel Apache can be easily modified with the limitipcon patch to allow limiting on a per vhost basis?

    Thanks

  9. #9
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Nov 2003
    Location
    moscow
    Posts
    294

    Default

    Because you use Apache 1.3.xx i recommend you mod_ipdrop (http://miksir.pp.ru/?r=65). it is best of the best apache modules specialy designed for preventing flood attack. Installation is very easy as well as setup.
    https://robobill.net
    US dedicated, Europe and Asia and Russia dedicated server. Shared, Reseller, VPS hosting in US and Europe.
    We are RESELLER of dedicated servers since 2002.

  10. #10
    PbG
    PbG is offline
    Member PbG's Avatar
    Join Date
    Mar 2003
    Posts
    238

    Default

    Do these instructions still apply now that we have to use Easy Apache3?

    Quote Originally Posted by sssathish View Post
    Hi,

    Installing mod_limitipconn.c

    This is the apache module mod_limitipconn.c, which
    allows web server administrators to limit the number of simultaneous downloads permitted from a single IP address.

    =================
    Log into ssh

    cd /usr/src
    wget http://dominia.org/djao/limit/mod_li...nn-0.04.tar.gz
    tar xzvf mod_limitipconn-0.04.tar.gz
    cd mod_limitipconn-0.04

    pico Makefile
    find the line that reads APXS=apxs[/b]
    change that to
    APXS=/usr/local/apache/bin/apxs

    press cntrl O to save
    then cntrl X

    // if your locations to apxs is different
    locate apxs and copy the path
    then paste that in
    //

    make
    make install

    service httpd restart

    pico -w /etc/httpd/conf/httpd.conf

    locate ExtendedStatus
    Make sure ExtendedStatus is on and without the comment at the start

    and add this line to every virtual directory you want to limit
    or add it once to the main directory to limit all

    <IfModule mod_limitipconn.c>
    <Location /somewhere>
    MaxConnPerIP 3
    # exempting images from the connection limit is often a good
    # idea if your web page has lots of inline images, since these
    # pages often generate a flurry of concurrent image requests
    NoIPLimit image/*
    </Location>

    <Location /mp3>
    MaxConnPerIP 1
    # In this case, all MIME types other than audio/mpeg and video*
    # are exempt from the limit check
    OnlyIPLimit audio/mpeg video
    </Location>
    </IfModule>

    press cntrl O to save
    then cntrl X
    then service httpd restart

Similar Threads & Tags
Similar threads

  1. Concurrent Connections Limit
    By scegg in forum Feature Requests for cPanel/WHM
    Replies: 1
    Last Post: 01-24-2011, 02:24 PM
  2. Concurrent Connections Limit
    By scegg in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 01-22-2011, 11:20 PM
  3. how to limit connections per IP
    By Batmunkh in forum New User Questions
    Replies: 4
    Last Post: 06-27-2009, 04:26 AM
  4. limit multiple simultaneous ip connections
    By ASTRAPI in forum New User Questions
    Replies: 2
    Last Post: 09-09-2008, 08:23 AM
  5. Anyone know how to limit a amount of connections per i.p.?
    By DWHS.net in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 04-13-2005, 10:07 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube