• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

Question DDos how can i limit number of time a ip can hit the server?

raykai

Basic Pleskian
Hi im getting DDos and would need a way to block IPs after x number of requests in X amount of time.

Or is there another way of doing something to limit IPs from hitting the server?

My logs are full of ngix error such as

Code:
[alert] 27026#0: *19582 socket() failed (24: Too many open files) while connecting to upstream.
[crit] 27026#0: *12923 open() "/var/lib/nginx/proxy/4/36/0000000364" failed (24: Too many open files) while reading upstream.
27026#0: *12812 upstream timed out (110: Connection timed out) while reading response header from upstream.

Im getting so many hits that my websites are knocked offline. Any help would be appreciated.
 
Hi im getting DDos and would need a way to block IPs after x number of requests in X amount of time.

Or is there another way of doing something to limit IPs from hitting the server?

My logs are full of ngix error such as

Code:
[alert] 27026#0: *19582 socket() failed (24: Too many open files) while connecting to upstream.
[crit] 27026#0: *12923 open() "/var/lib/nginx/proxy/4/36/0000000364" failed (24: Too many open files) while reading upstream.
27026#0: *12812 upstream timed out (110: Connection timed out) while reading response header from upstream.

Im getting so many hits that my websites are knocked offline. Any help would be appreciated.
use fail2ban filter.
 
yes, I have it installed problem I have is there are no Ngnix Jails and no Ngnix Jails:
Snipaste_2021-08-20_14-03-57.png


i know I can add custom filters...
Tools & Settings > IP Address Banning > Jails > Jail Filters > Add Jail Filter

Snipaste_2021-08-20_13-57-05.png

But what do I add in here to solve my problem?
 
You'll need to write your own jail filter to track requests by IP.

I would just raise the open file limit as a mitigation - you don't want your server going down from the either way. Then consider something like Cloudflare. Rate Limiting is best done as close to the client as possible.
 
Back
Top