A
atomicmak
Guest
Can anyone exper please post a easy guide on how to install mod_security and configure it ?
step by step?
step by step?
#SecFilterEngine DynamicOnly
SecFilterEngine On
SecFilterDefaultAction "deny,log,status:500"
SecFilterScanPOST On
SecFilterCheckURLEncoding On
SecFilterCheckCookieFormat On
SecFilterCheckUnicodeEncoding Off
SecFilterNormalizeCookies On
SecFilterCookieFormat 1
SecServerResponseToken Off
#If you want to scan the output, uncomment these
#SecFilterScanOutput On
#SecFilterOutputMimeTypes "(null) text/html text/plain"
# Accept almost all byte values
SecFilterForceByteRange 1 255
# Server masking is optional
#fake server banner - NOYB used - no one needs to know what we are using
SecServerSignature "NOYB"
#SecUploadDir /tmp
#SecUploadKeepFiles Off
# Only record the interesting stuff
SecAuditEngine RelevantOnly
SecAuditLog /var/log/modsecurity/audit_log
# You normally won't need debug logging
SecFilterDebugLevel 0
SecFilterDebugLog /var/log/modsecurity/modsec_debug_log
#Include our got-root rules we downloaded. Note I dont use all of them, some of the long rules sets cause performance issues, so check them out for yourself.
Include /etc/apache2/Includes/modsecurity/exclude.conf
Include /etc/apache2/Includes/modsecurity/rules.conf
Include /etc/apache2/Includes/modsecurity/apache2-rules.conf
#Include /etc/apache2/Includes/modsecurity/blacklist.conf
Include /etc/apache2/Includes/modsecurity/blacklist2.conf
#Include /etc/apache2/Includes/modsecurity/badips.conf
Include etc/apache2/Includes/modsecurity/useragents.conf
Include /etc/apache2/Includes/modsecurity/recons.conf
Include /etc/apache2/Includes/modsecurity/jitp.conf
Include /etc/apache2/Includes/modsecurity/proxy.conf
Include /etc/apache2/Includes/modsecurity/rootkits.conf
you create excludes for the rule matches using the url and rule id.id:300040
#Allow me to do whatever i want
SecFilterSelective REMOTE_ADDR ^my.ip.here.*$ nolog,allow
#Squirrel mail and Horde postings
<LocationMatch "/imp/compose.php">
SecFilterRemove 300013
SecFilterRemove 300015
SecFilterRemove 300016
</LocationMatch>
#vbulliten1
<LocationMatch "/admincp/moderator.php*">
SecFilterRemove 300013
SecFilterRemove 300015
SecFilterRemove 300016
</LocationMatch>
#vbulletin2
<LocationMatch "/forums/admincp/moderator.php*">
SecFilterRemove 300013
SecFilterRemove 300015
SecFilterRemove 300016
</LocationMatch>
#vbulletin3
<LocationMatch "/forums/admincp/admin.php*">
SecFilterRemove 300013
SecFilterRemove 300015
SecFilterRemove 300016
</LocationMatch>
#vbulletin4
<LocationMatch "/forums/admincp/usergroup.php*">
SecFilterRemove 300013
SecFilterRemove 300015
SecFilterRemove 300016
</LocationMatch>
#vbulletin5
<LocationMatch "/forums/profile.php*">
SecFilterRemove 300018
</LocationMatch>
#vbulletin6
<LocationMatch "/forums/register.php*">
SecFilterRemove 300018
</LocationMatch>
#vbulletin7
<LocationMatch "/forums/login.php*">
SecFilterRemove 300018
</LocationMatch>
#vbulletin8
<LocationMatch "/forums/newreply.php*">
SecFilterRemove 300018
</LocationMatch>
#vbulletin9
<LocationMatch "/forums/admincp/vbacmps_install.php*">
SecFilterRemove 300018
</LocationMatch>
#vbulletin10
<LocationMatch "/forums/admincp/options.php*">
SecFilterRemove 300018
</LocationMatch>
#vbulletin11
<LocationMatch "/forums/newthread.php*">
SecFilterRemove 300018
</LocationMatch>
#vbulletin12
<LocationMatch "/forums/private.php*">
SecFilterRemove 300018
</LocationMatch>
Unless you run freeBSDOriginally posted by atomicturtle
but still nothing like rh9/2.6.