I've got geolocation set up and a ModSecurity rule that works to block a country, but what I need is to block the country only for a few domains. The security rules below are working, but block the country (I substituted "XX" for the correct country code for the country in question) on all domains instead of just the one I specified:
SecRule REMOTE_ADDR "@geoLookup" "phase:1,chain,id:10,drop,log,msg:'Blocking Country IP Address'"
SecRule GEO:COUNTRY_CODE "@streq XX"
SecRule SERVER_NAME "thedomain.com"
How do I limit the domains that the rules apply to?
SecRule REMOTE_ADDR "@geoLookup" "phase:1,chain,id:10,drop,log,msg:'Blocking Country IP Address'"
SecRule GEO:COUNTRY_CODE "@streq XX"
SecRule SERVER_NAME "thedomain.com"
How do I limit the domains that the rules apply to?