TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: How to mitigate Layer 7 attacks?

8 pointsby thegeekbinover 5 years ago
Hi HN,<p>I was recently a victim of Layer 7 DDoS attacks, and use Cloudflare. Cloudflare was able to migrate them off, but I&#x27;m in the mix of changing from Cloudflare to my own system for most of my websites and my wifes (blogged about it here: https:&#x2F;&#x2F;thegeekbin.com&#x2F;ddos-protection-my-experience&#x2F;).<p>What&#x27;s a reliable way to mitigate most layer 7 attacks? I&#x27;ve added into nginx filters for slow connections (eg, HEAD and wait X time to clog server resource, slowloris) and other things like bad user agents, R-U-DEAD-YET, etc. but I&#x27;m not sure that&#x27;s going to be enough.<p>What&#x27;s your take on this HN? Any pointers to provide good enough protection against most common attacks?<p>Thanks

3 comments

hamid_raover 5 years ago
What is your website?! is it just a content website or you have some sort of services serving your requests in backend. Application DDos attacked can hugely impact your website if they can put load on your backend and eventually trash your servers. Some useful solutions for those scenarios: -proper authentication&#x2F;authorization mechanism -keep stats per user or session and set quota on the number of requests per user or session -add captcha to your registration pages to prevent them from scripting your signup.
zzzcpanover 5 years ago
I&#x27;m assuming you also want a simple way to mitigate layer 7 attacks, which is the hard part. You can try something like gathering statistics of &#x2F;24 IP subnets that make connections to your server and once you detect increase in unseen subnets that goes over some threshold you think your server can&#x27;t handle - nullroute unseen subnets that go over that threshold for some short period of time. And on a web server side configure rate limiting for everything.
评论 #21282621 未加载
gtirloniover 5 years ago
Cloudflare is a good way to mitigate those attacks. They have a pipe much bigger than what most attackers can get together.<p>You don&#x27;t stand a chance against a DDoS and you have to work with your upstream ISP to mitigate some of it. They might not have the tools to help you though.
评论 #21282389 未加载