I found 100% cpu usage, most likely from a DDOS attack, how do I fix this? https://www.img.in.th/images/c86d0492c91e0967f0d8da048d76df07.png
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
What you could do is to use a CDN provider like Cloudflare, which also includes free DDoS protection that you can enable in such situations.
I do have a script that you could use to automatically enable the Cloudflare DDoS protection, whenever the server CPU usage spiles up. You can follow the steps on how to do that here:
Bash Script to Automatically Enable Cloudflare DDoS Protection
Let me know how it goes!
Best,
Bobby
As mentioned using a CDN like CloudFlare is the best option there is.
If you don’t want to use one, however, you can try a more restrictive firewall like Fail2Ban. Check the following tutorial on how to configure and use it:
https://www.digitalocean.com/community/tutorials/how-to-protect-ssh-with-fail2ban-on-ubuntu-20-04
Hello there,
Quick update here. I’m excited to share that DigitalOcean has introduced a new feature in response to the valuable feedback we’ve received from users like you: DigitalOcean DDoS Protection:
Here are some key points about this new offering:
Cost: DigitalOcean DDoS Protection is available at no additional cost. That’s right, it’s a free service for all users!
Coverage: The protection extends to a range of DigitalOcean resources including:
Protection Layers: This service provides protection primarily at the Network (layer 3) and Transport (layer 4) layers of the OSI model. Please note that Application layer (layer 7) DDoS Protection is currently not supported.
Latency Concerns: One of the standout features of this service is that mitigation takes place entirely within the DigitalOcean network. This means that data traffic doesn’t leave our network for mitigation, ensuring that your applications experience no additional latency.
Overall Benefit: DigitalOcean DDoS Protection is an always-on service designed to defend your DigitalOcean cloud resources against a range of generalized, network-layer DDoS attacks. This ensures that your apps and websites run smoothly, without the threat of potential disruptions from such attacks.
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.