Exclude ip's from Nginx limit_req zone

ASTRAPI nginx-forum at nginx.us
Sat Dec 20 23:18:03 UTC 2014


I am using this code to limit connections from ip's :

Main nginx config:

limit_conn_zone $binary_remote_addr zone=alpha:8m;
limit_req_zone $binary_remote_addr zone=delta:8m rate=40r/s;

Domain nginx conf:

limit_conn alpha 5;
limit_req zone=delta burst=80 nodelay;

So a user can create only 5 connections per ip and can have 40 requests with
a burst up to 80 connections.

Now i want to exclude Cloudflare ip's from this connection limits.

Any ideas how can i do it?


Posted at Nginx Forum: http://forum.nginx.org/read.php?2,255697,255697#msg-255697

More information about the nginx mailing list