Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Nov 2008
    Location
    Blumenau, SC, Brazil
    Posts
    2

    Default Modsecurity

    Hello everyone,

    I currently run some servers with cPanel, and they have modsecurity active to increase security. The problem i'm facing is that mod_security is blocking some scripts that are usually OK, or in other words, there is too many false-positives.

    I came up with an idea to fix that. Since my traffic is 90% from my country, and usually the problems i had with security came from other countries, i decided to create a rule on mod_security to "relax" a bit when the ip is from my country.

    Here is what i have on my modsec2.conf:

    SecGeoLookupDb /usr/local/geo/GeoIP.dat
    SecRule REMOTE_ADDR "@geoLookup"
    SecRule GEO:COUNTRY_CODE "@streq BR" phase:1,nolog,allow,ctl:ruleEngine=off

    What i want it do to is:

    - Look the user IP address and check on the database that i downloaded from Maxmind, and confirm if its from my country or not.

    - If the ip is from my country, mod_security will skip phase 1, because on this phase all false-positives happened.

    In case the ip is from another country, mod_security will work on full power!

    Anyways, my question is:

    Is this rule above right? Some months ago i wrote it and it was working, but i lost it when i upgraded apache and now i'm not sure if this is right.

    Thank you!

  2. #2
    Registered User
    Join Date
    Nov 2008
    Location
    Blumenau, SC, Brazil
    Posts
    2

    Default

    Anyone help?

  3. #3
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,891
    cPanel/Enkompass Access Level

    Root Administrator

  4. #4
    Member
    Join Date
    Jul 2005
    Location
    Sticky On Internet
    Posts
    555

    Default

    newer apache would require newer mod-security and compatible ruleset.

    Also you can specifically disable few rules per account using
    ConfigServer ModSecurity Control

Similar Threads & Tags
Similar threads

  1. ModSecurity Rules
    By Angel78 in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 04-08-2009, 11:20 AM
  2. ModSecurity
    By Piolon in forum Discusión en Español
    Replies: 5
    Last Post: 02-18-2008, 12:18 PM
  3. modsecurity problem
    By arabvps.net in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 12-17-2007, 09:50 AM
  4. modsecurity
    By Giannis in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 06-22-2005, 02:23 AM
  5. ModSecurity
    By Solokron in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 02-09-2004, 06:49 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube