1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Bandwidth Suckers - how to block?

Discussion in 'Apache' started by anton-io!, Jun 14, 2005.

  1. #1
    Help!

    Going through some logs and I've noticed already on a number of sites where I'm getting 5000+ hits and bandwidth being sucked up

    200MB+ at a time ... sites are not graphic heavy.

    Any way to deny or stop this? .htaccess?

    culprit: back*ndhost. com


    Did a search on Google & they're all over the place in ppl's logs

    http://www.google.com/search?hl=en&q=backendhost&btnG=Google+Search

    :confused: :mad: :confused: :mad:
     
    anton-io!, Jun 14, 2005 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    Do you have root access to the server?
     
    digitalpoint, Jun 14, 2005 IP
  3. anton-io!

    anton-io! Active Member

    Messages:
    540
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    58
    #3
    no

    have a reseller account with mutiple domains
    WHM cPanel
     
    anton-io!, Jun 14, 2005 IP
  4. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #4
    Yeah... probably best thing you can do is .htaccess that forbids access to a certain block of IP address then. (Root access and you could just block any network activity from the IPs).
     
    digitalpoint, Jun 14, 2005 IP
  5. anton-io!

    anton-io! Active Member

    Messages:
    540
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    58
    #5
    Thanks - I figured that as well

    .htaccess is the only defence for now ...

    ... unless I wrote a re-direction script that cooked their server! :eek:
     
    anton-io!, Jun 14, 2005 IP
  6. stoner3221

    stoner3221 Notable Member

    Messages:
    865
    Likes Received:
    233
    Best Answers:
    0
    Trophy Points:
    285
    #6
    Your cpanel should have one or more utilities for blocking the IP. Very easy to use.
     
    stoner3221, Jun 15, 2005 IP
  7. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #7
    It never will - they will simply drop your replies. What kind of activity you see from them in the logs?

    J.D.
     
    J.D., Jun 15, 2005 IP
  8. anton-io!

    anton-io! Active Member

    Messages:
    540
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    58
    #8
    I was joking about the re-direct ... :rolleyes: not worth the effort, plus I wouldn't know how....

    Under AWSTATS, under hosts, for one of the accounts I'm seeing on one day:


    ns1.back*ndhost.com
    Pages Hits MB
    6327 6327 141.78 MB
    server.back*ndhost.com
    Pages Hits MB
    6156 6156 137.97 MB
     
    anton-io!, Jun 15, 2005 IP
  9. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #9
    It's about 1.5 KB/s - not something you'd expect from a single client, unless they are a proxy of some kind. This doesn't show the pattern, though. Knowing the pattern makes it easier to deal with things like this. I would look through the logs - this may help you figure out whether it's some kind of an automated tool or a bunch of people behind a proxy.

    J.D.
     
    J.D., Jun 15, 2005 IP
  10. moskjaer.dk

    moskjaer.dk Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    How would you block it on IIS6?

    Kind regards

    Kurt Moskjaer Andersen
    www.moskjaer.dk
     
    moskjaer.dk, Jun 16, 2005 IP
  11. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Website Properties > Directory Security > IP address and domain name restrictions > Edit
     
    J.D., Jun 16, 2005 IP
  12. uca

    uca Well-Known Member

    Messages:
    2,242
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    155
    #12
    Sorry to bump up this thread, but I have exactly that problem. SOmeone is taking all my BW.

    With CPanel, what can I do precisely? How do I block IPs?

    The culprits appear to be Websense, CA and The Planet, TX

    Raw Logs appear to be a GZ file, how do I read that?

    Thanks for any help...!
     
    uca, Jul 9, 2005 IP
  13. bconnelly

    bconnelly Guest

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13

    Here are some guides to get you on your way with Cpanel. I am assuming that you have root access to the server or you would not be asking these questions to a forum. If you do not have root access to the machine your hosting company should be able to help you block networks, if not you need a new host ASAP.


    Cpanel Newbie Guide


    Apache Log Files Explained .... this one is in the related articles at the bottom of the above page, but just in case you don't read it all the way though, your Gzip file question should be answered.

    The EV1 Servers forum for Cpanel ..... This is a great resource for Cpanel.

    Good luck!
     
    bconnelly, Jul 9, 2005 IP
  14. uca

    uca Well-Known Member

    Messages:
    2,242
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    155
    #14
    Thank you mate!

    Very kind and fast!:)
     
    uca, Jul 9, 2005 IP
  15. uca

    uca Well-Known Member

    Messages:
    2,242
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    155
    #15
    I stopped 3 different IPs through CPanel, but I wonder what's the point of doing that to my little site!?!?
    What is there to gain?
     
    uca, Jul 9, 2005 IP
  16. anton-io!

    anton-io! Active Member

    Messages:
    540
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    58
    #16
    Good links thanks!

    In my case it was the blog app that i had running ... B2Evo ... I was getting hits from pharma sites and they were showing up in the refferer lists, which were displayed on the site. I ended up taking the blog section down. After that, bandwidth came back to normal
     
    anton-io!, Jul 9, 2005 IP
  17. uca

    uca Well-Known Member

    Messages:
    2,242
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    155
    #17
    I understand that, pure SPAM.

    But that's not my case as they aren't getting any links from my site.

    I wonder what else it could be...
     
    uca, Jul 9, 2005 IP
  18. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #18
    If you want to get to the bottom of this, you can filter your log to include only the offending IP address and then run the log through a log analysis tool (e.g. Webalizer). This will give you their access pattern (access times, access URLs, etc). This may show you what they were after (e.g. frequent access to certain files, such as login page, may indicate an attempt to break into your control panel).

    You can use grep (Linux) or findstr (Windows) to filter the logs.

    J.D.
     
    J.D., Jul 9, 2005 IP
  19. uca

    uca Well-Known Member

    Messages:
    2,242
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    155
    #19
    Anyway, I kept denying IPs but the site is down.

    I really don't know what to do.

    I upgraded the account twice but I can't carry on. They get to my BW limit until the site is down. Move my site?

    Is that the only solution to the problem?
     
    uca, Jul 13, 2005 IP
  20. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #20
    * Get your logs and extract them from the archive (e.g. gunzip logfilename.gz)

    * Run a log analyzer on the extracted logs and see which IP addresses pump more data. There are three possible scenarios - a) a small group of IPs used to hit your website (e.g. all from the same ISP), which will indicate that most likely some individual is after you or b) many, many IPs are hitting your website, which may indicate a distributed attack. This one is hard to deal with; c) your website is just *that* popular or you have too many files or your graphics are too large;

    + in the first case, blocking the offending IP addresses should remedy the problem. In those cases when IP addresses are from the region you don't care much about, you can block the entire ISP).

    + if your content is too big for your bandwidth, configure your website to use compression and caching

    + a distributed attack is not something that can be easily advised on

    * once you get the IPs, you can filter the logs by IP address and see usage patterns. This may help you to figure out what to do with them (e.g. somebody who requests same file over and over again over a short period of time and without following any links on your website can be blocked; if somebody just going from a page to a page, like reading a forum, you just need to configure your website to better deal with this)

    J.D.
     
    J.D., Jul 13, 2005 IP