Bandwidth Control on Shared Server

Discussion in 'Site & Server Administration' started by DoA, Sep 19, 2007.

  1. #1
    Hi guys,

    I run a forum where users can download files. Unfortunately every once in a while there is the idiot that comes along and downloads EVERYTHING causing my host to cut off my account for 24 hours.

    I was wondering if there is a way to control bandwidth allowed per username (they must be logged in to gain access to the download links) and/or ip address.

    A PHP or htaccess solution would be best, but anything where I can stop users downloading too much!

    Many thanks

    DoA
     
    DoA, Sep 19, 2007 IP
  2. readme

    readme Banned

    Messages:
    103
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    There are two modules of apache, one is called mod_limitipconn and mod_bandwidth, with mod_bandwidth you can limit the bandwidth per second rate and with the mod_limitipconn you can limit the downloads per IP.

    Try any of the above module, i recommend you to use both, they should fill your whole need :)
     
    readme, Sep 19, 2007 IP
  3. DoA

    DoA Peon

    Messages:
    531
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Good post but not what I needed, I nned something that will see user 1 (ip - 111.111.111.11) and only allow that user to download say 20mb.

    It looks like mod_cband will do the trick, unfortunately I'm on a shared server & so can't use it.... anyone got anything suitable?
     
    DoA, Sep 19, 2007 IP
  4. readme

    readme Banned

    Messages:
    103
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You can use mod_limitipconn and mod_bandwidth both to limit per user at 20MB bandwidth each IP with one connection :)
     
    readme, Sep 19, 2007 IP
  5. DoA

    DoA Peon

    Messages:
    531
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I meant so that they can only download a total filesize of 20mb not download at 20mb/sec

    I think mod_limitipconn will only limit the number of simultaneous downloads per IP address.

    I'm not particularly bothered how many simultaneous downloads they havew as long as they can only download a total of 20mb filesize.

    DoA
     
    DoA, Sep 19, 2007 IP
  6. DoA

    DoA Peon

    Messages:
    531
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #6
    DoA, Sep 30, 2007 IP