Adblock breaks this site

Load Issues, IP Blocking

Discussion in 'Web Programming' started by Jimmy, Feb 7, 2015.

  1. Jimmy

    Jimmy Ghost
    Retired Sectional Moderator $5 USD Donor

    Joined:
    Jun 24, 2008
    Posts:
    2,421
    Referrals:
    10
    Sythe Gold:
    25
    Load Issues, IP Blocking

    I'm currently running a web server off Amazon's AWS service (they offer a year to students for free!). The issue is that whenever the site gets too much traffic--especially repeated junk traffic from certain questionable IP addresses--the mysql database crashes and needs to be restarted.

    Other than getting a better/real server, what are the best ways to deal with this? What's the best way to block IP addresses based on too many incoming connections, and what is a good method of connection monitoring for an apache web server running Amazon's linux distro?
     
  2. Jon

    Jon Jon passed away July 20, 2016. May he rest in peace.
    $200 USD Donor New Cancer Warrior Heavenly

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Referrals:
    3
    Sythe Gold:
    11
    420 yolo swag blaze it fuck the popo legalize it anyone got some chips Two Factor Authentication User Easter 2016 Valentine's Day 2016 Community Development Team Member Tier 1 Prizebox Halloween 2015 Christmas 2015
    Load Issues, IP Blocking

    .htaccess is how you can block IP addresses if that is what you're dealing with. I also offer web hosting(in my sig) that is $1/month and provides DDoS protection. Another thing I offer is litespeed webserver instead of apache. That's included.
     
  3. The Don Kiluminati

    The Don Kiluminati Guru

    Joined:
    Dec 28, 2005
    Posts:
    1,012
    Referrals:
    0
    Sythe Gold:
    0
    Load Issues, IP Blocking

    Getting a better server isn't really a long term solution, unless the high load was due to authentic traffic which you said doesn't seem to be case. Since you're using Linux, something like fail2ban should do the job which blocks ip's automatically based on the number of connections.

    Information on fail2ban - http://www.fail2ban.org/wiki/index.php/Main_Page
    A guide on how to utilize it with apache - http://linuxaria.com/howto/how-to-protect-apache-with-fail2ban

    If you do have issues with DDos however, then a good free solution would be implementing something like CloudFlare - https://www.cloudflare.com/

    Let me know if you require any help with anything.
     
  4. Jon

    Jon Jon passed away July 20, 2016. May he rest in peace.
    $200 USD Donor New Cancer Warrior Heavenly

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Referrals:
    3
    Sythe Gold:
    11
    420 yolo swag blaze it fuck the popo legalize it anyone got some chips Two Factor Authentication User Easter 2016 Valentine's Day 2016 Community Development Team Member Tier 1 Prizebox Halloween 2015 Christmas 2015
    Load Issues, IP Blocking

    Cloudflare does NOT protect against DDoS unless you're paying for the $200/month plan.
     
  5. The Don Kiluminati

    The Don Kiluminati Guru

    Joined:
    Dec 28, 2005
    Posts:
    1,012
    Referrals:
    0
    Sythe Gold:
    0
    Load Issues, IP Blocking

    The free package does give you DDos protection - https://www.cloudflare.com/plans

    It's basic, but for someone like the OP it should be fine. There's no need to invest in any advanced protection unless you were getting absolutely hammered.
     
  6. Jon

    Jon Jon passed away July 20, 2016. May he rest in peace.
    $200 USD Donor New Cancer Warrior Heavenly

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Referrals:
    3
    Sythe Gold:
    11
    420 yolo swag blaze it fuck the popo legalize it anyone got some chips Two Factor Authentication User Easter 2016 Valentine's Day 2016 Community Development Team Member Tier 1 Prizebox Halloween 2015 Christmas 2015
    Load Issues, IP Blocking

    What they offer for free, I don't consider DDoS protection.
     
  7. mattG

    mattG Newcomer

    Joined:
    Aug 19, 2015
    Posts:
    7
    Referrals:
    0
    Sythe Gold:
    0
    Load Issues, IP Blocking

    Is your mysql isam? Probably is, might wanna look at that.
     
< JavaScript help, beginner stuck on one problem | Livechat button question? >


 
 
Adblock breaks this site