Abdu Taviq

Quick DDoS Protection

One of my client’s website got under a DDoS attack and I needed to act quickly. But first I needed to confirm it was a DDoS attack and not something else:

Logs
Logs

That’s where it was confirmed it was a DDoS attack and needed to stop it in few easy steps:

1limit_conn_zone $binary_remote_addr zone=addr:10m;
2
3server {
4    limit_conn addr 10;
5}
1http {
2    deny 94.158.245.100
3}

Voilà! the CPU usage just dropped to almost normal usage thanks to Nginx’s high throughput to just deny a high amount of requests easily. Of course a better option is to use CloudFlare but when under attack, one must act quickly to keep the website afloat compared to just shutting down the server!

CPU Usage down
CPU Usage down

Read more: