title: modsecurity allow 1 country only
body: <p>I'm currently using the following modsecurity config on my webservers to block countries:</p>
  
  <pre><code>SecGeoLookupDb GeoIP.dat
  SecRule REMOTE_ADDR "@geoLookup" "chain,id:1,deny,msg:'Block IN'"
  SecRule GEO:COUNTRY_CODE "@streq IN"
  </code></pre>
  
  <p>Now for a new project I'm looking to allow only certain countries. Can this be done using a default rule that blocks all traffic and something like the following to allow a country?</p>
  
  <pre><code>SecGeoLookupDb GeoIP.dat
  SecRule REMOTE_ADDR "@geoLookup" "chain,id:1,pass,msg:'Block IN'"
  SecRule GEO:COUNTRY_CODE "@streq IN"
  </code></pre>