map $geoip2_data_country_code $allowed_country { default yes; %BLOCK_COUNTRY% } if ($allowed_country = no) { return 403; }