1

I used this rule to block country in Mod_security : (I already configured @geoLookup with the maxmide lite database .dat)

# Test IP address and block by country code
SecRule REMOTE_ADDR "@geoLookup" "phase:1,chain,id:10,drop,log,msg:'Blocking China IP Address'"
SecRule GEO:COUNTRY_CODE "@streq CN"

But it doesn't work, no ip logged. I tried with a different country and it does not work.

Any help?

Thank you.

MSU_Bulldog
  • 3,501
  • 5
  • 37
  • 73
PlusLia
  • 11
  • 2
  • Rule looks fine. Can you up set SecDebugLog and SecDebugLogLevel and see if anythign shows there. Note this will produce a log of logging so should not be done in production for a busy site. – Barry Pollard Nov 09 '15 at 17:03
  • More simple and effective, it's use a firewall, and block country on firewall for 80 port. Effective beacuse minor cpu and menory recurses. IMHO. – abkrim Nov 14 '15 at 17:33

0 Answers0