geoip filtering not working

bignginxfan nginx-forum at nginx.us
Sat Jul 13 02:08:56 UTC 2013


Hello,

I'm trying to figure out why Nginx's geoip modules doesn't seem to filter
out certain ip's from a banned country. I manually tested the GeoIP.dat
using 'geoiplookup' against a few ips that successfully connected but were
in a banned country. GeoIP.dat was fine, it wasn't the problem. Maybe its a
config problem? Wondering if you guys can help.

i have the following lines in config:

geoip_country /usr/share/GeoIP/GeoIP.dat;

server {
...
    if ($geoip_country_code = CN) {
            return 444;
    }
....
}

Please help!

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



More information about the nginx mailing list