<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body dir="auto"><div dir="auto">I dont think limit_req works on CIDR rather individual IPs. At least per the description of the module for limiting requests, it works on a single IP level not on a CIDR range level and I don't immediately see a way to make that happen - whether IPv4 or IPv6.</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><br></div><div id="composer_signature" dir="auto"><div style="font-size:85%;color:#575757" dir="auto">Sent from my T-Mobile 4G LTE Device</div></div><div dir="auto"><br></div><div><br></div><div align="left" dir="auto" style="font-size:100%;color:#000000"><div>-------- Original message --------</div><div>From: Christian Staudte <christian@staudte.it> </div><div>Date: 4/4/21 16:14 (GMT-05:00) </div><div>To: nginx@nginx.org </div><div>Subject: limit_req_zone for IPv6 subnets </div><div><br></div></div>Hello,<br><br>regarding rate limiting in IPv6 configurations I see the following<br>problem: As normally a subnet between a /56 and a /64 is assigned to a<br>client by an ISP, and both $binary_remote_addr and $remote_addr always<br>contain the whole IPv6 address, a single client can always spoof the<br>rate limiter by simply choosing another IPv6 address from his own subnet.<br><br>Currently I have two options to avoid this:<br>a) Disabling IPv6 (well, not really considering that)<br>b) Using application-level rate limiting in PHP which is awkwardly slow<br><br>Did I miss some configuration options or some dirty hack to do the rate<br>limit matching for example on /64 subnets, or is this simply not<br>possible in nginx?<br><br>Regards, Chris<br>_______________________________________________<br>nginx mailing list<br>nginx@nginx.org<br>http://mailman.nginx.org/mailman/listinfo/nginx<br><br></body></html>