GeoIP country blocking - whitelist specific IPs
Infinitnet
nginx-forum at nginx.us
Tue Nov 13 11:21:10 UTC 2012
Hello,
thanks for your reply! Your solution does indeed make sense and I've been
using something similar before. Just thought there might be something that
wouldn't require rewriting my current syntax, such as:
if ($geoip_country_code ~ (BR|CN|KR|RU) ) {
if ($remote_addr = (1.2.3.4|1.2.3.5|1.2.3.6) ) {
break;
}
return 123;
}
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,232745,232762#msg-232762
More information about the nginx
mailing list