Nginx Block Country except IP

Discussion in 'Installation/Configuration' started by cbennett, Oct 31, 2013.

  1. cbennett

    cbennett New Member

    Hi Guys

    I am reading though the following article which is excellent:
    http://www.howtoforge.com/nginx-how-to-block-visitors-by-country-with-the-geoip-module-debian-ubuntu

    However I need to block a whole country (say XX) BUT to allow a single subnet (or maybe subnets) as an exception which exist within country XX...

    for example, the IP a.b.c.d appears under country XX which I have blocked. But I need to allow a.b.c.d/24 though but nothing else for that country...

    Can any one help advise?

    It seems as if I need to set the $allowed_country variable as yes but I am not sure how to set it.... can some one please help?

    Thanks
     

Share This Page