Can nginx block ~20.000 ips?
And should i block ips (https://lists.blocklist.de/lists/all.txt) with nginx?
Can nginx block ~20.000 ips?
And should i block ips (https://lists.blocklist.de/lists/all.txt) with nginx?
Theoretically yes, you could block those IPs by using the deny
config option in nginx: e.g., with the file /etc/nginx/denyip.conf
deny 1.1.1.1;
deny 2.2.2.0/24;
deny 3.3.3.3;
And then in /etc/nginx/nginx.conf
in your HTTP block
include denyip.conf;
However, you shouldn't really be blocking IP addresses with Nginx. It is much better to block them with your firewall, so they can't connect to your server at all, instead of being able to connect to everything but Nginx.