I am configuring nginx for basic DDoS protection. I want to use the limit_conn module as described in http://nginx.org/en/docs/http/ngx_http_limit_conn_module.html. In particular I do not understand this example:
limit_conn_zone $binary_remote_addr zone=perip:10m;
limit_conn_zone $server_name zone=perserver:10m;
server {
...
limit_conn perip 10;
limit_conn perserver 100;
}
The description is:
For example, the following configuration will limit the number of connections to the server per a client IP and, at the same time, the total number of connections to the virtual host
The first part is clear, I am allowing not more than 10 simultaneous connections from one IP.
But does the second rule mean, that I am only allowing 100 connections to my server? Because if it so, and the attacker just opens ~100 connections it would block everyone from accessing the server, effectively making DDoS attack succeed.