Hey I am looking for modsecurity rule for the apache version 2. I have set of rules for apache 1 and is working fine , but now looking for 2 . Please let me know the link if you know it. Regards
Extract the files into a new folder called security 2, (that's what I would name it). There are 9 config files that we need to include into mod_security ((HOW-TO)) <IfModule mod_security2.c> SecRuleEngine On SecDefaultAction log,auditlog,deny,status:403,phase:2,t:lowercase,t:replaceNulls,t:compressWhitespace SecAuditEngine RelevantOnly SecAuditLogType Serial SecAuditLog logs/mod_security2.log ## -- General rules -------------------- SecRule ARGS "c:/" t:normalisePathWin SecRule ARGS "\.\./" t:normalisePathWin SecRule ARGS "d:/" t:normalisePathWin ## -- phpBB attack -------------------- SecRule ARGS:highlight "(\x27|%27|\x2527|%2527)" #GotRoot Exclude rules Include conf/security2/exclude.conf #GotRoot apache2 rules Include conf/security2/apache2-rules.conf #GotRoot blacklist rules Include conf/security2/blacklist.conf #GotRoot blacklist2 rules Include conf/security2/blacklist2.conf #GotRoot jitp rules Include conf/security2/jitp.conf #GotRoot recons rules Include conf/security2/recons.conf #GotRoot rootkits rules Include conf/security2/rootkits.conf #GotRoot rules Include conf/security2/rules.conf #GotRoot useragents rules Include conf/security2/useragents.conf </IfModule> Exclude.conf MUST be loaded first per GotRoots instructions. Note: This is not a universal config, it may block certain traffic, as all websites are different. Configure it how you want. You may need to adjust some rules, or take out some. If you run into an issue, look at the security log and then comment out the rule that is affecting legitimate traffic in its conf file; simply add a # in front to negate that rule.
Thanks, but you forgot to post the link for downloading the rules. If it is from gotRoot, I have tried it and it never worked for me and gave apache failiure
Here you go, just what you're looking for: http://www.gotroot.com/tiki-index.php?page=mod_security+rules
there is more good rules you can get from this website also it's have automatically install script you can get it from 403 security