Results 1 to 3 of 3

Thread: mod_security plugin not seeing log file?

  1. #1
    Member
    Join Date
    Jun 2007
    Posts
    28

    Default mod_security plugin not seeing log file?

    I am running mod_security on a couple of sites running RHEL5 and the latest cpanel/whm. However, looking at the mod_security plugin in whm, there is nothing showing in spite of getting some things blocked by mod_security? Maybe I need to point the plugin to the correct mod_security log file location.

    Below are my settings for mod_security in httpd.conf.

    <IfModule mod_security.c>
    # Turn the filtering engine On/Off
    SecFilterEngine On

    # Modify your Server Signature, or turn it off by setting it to empty string.
    SecServerSignature "Keep Looking!!"

    # Enforce URL encoding validation
    SecFilterCheckURLEncoding On

    # Unicode Encoding Validation
    SecFilterCheckUnicodeEncoding Off

    # Byte range
    SecFilterForceByteRange 1 255

    # The audit engine can be turned On of Off on the per server or
    # per directory basis. "On" will log everything, "DynamicOrRelevant"
    # will only log dynamic requests or violations, and "RelevantOnly"
    # will only log policy violations
    SecAuditEngine RelevantOnly

    # The name of the audit log file
    SecAuditLog /var/log/httpd/modsecurity_audit_log

    # Whether the mod_security should inspect POST payloads
    SecFilterScanPOST On

    # Action to take by default
    SecFilterDefaultAction "deny,log,status:500"

    # Require HTTP_USER_AGENT and HTTP_HOST in all requests
    SecFilterSelective "HTTP_USER_AGENT|HTTP_HOST" "^$"

    # Prevent path traversal (..) attacks
    SecFilter "../"

    # Weaker XSS protection but allows common HTML tags
    SecFilter "<[[:space:]]*script"

    # Prevent XSS atacks (HTML/Javascript injection)
    SecFilter "<(.|n)+>"

    # Very crude filters to prevent SQL injection attacks
    SecFilter "delete[[:space:]]+from"
    SecFilter "insert[[:space:]]+into"
    SecFilter "select.+from"

    # Protecting from XSS attacks through the PHP session cookie
    SecFilterSelective ARG_PHPSESSID "!^[0-9a-z]*$"
    SecFilterSelective COOKIE_PHPSESSID "!^[0-9a-z]*$"
    </IfModule>

  2. #2
    Member
    Join Date
    Jul 2005
    Posts
    56

    Default

    Same here.. last entry displayed here is from 2007-06-04 but has been working because i am receiving notices from csf via email.

    --Jeremy

  3. #3
    Member
    Join Date
    Mar 2002
    Location
    Alberta, Canada
    Posts
    1,509

    Default

    We've only upgraded one Server to v11 but upon doing so, mod_sec which worked just fine previously showed last log date of 2006. Had to uninstall/reinstall to get it working right again.

    Make sure to have a backup of your Rules so you can paste them in again.


    Also, found it was a good idea to reinstall cPanel Pro as well. Perhaps it goes without saying that all previously installed Modules should be reinstalled?

    Note: v11 calls them Plugins whereas previous cPanel versions called them "Addon Modules", in case anyone was wondering.
    Helping people Host, Create, and Maintain their Web Site
    Also providing Server Admin Services - setup / troubleshooting

    http://potentproducts.com/

Similar Threads

  1. WHM cpup should include log file path and link to log file
    By lbeachmike in forum Feature Requests for cPanel & WHM
    Replies: 0
    Last Post: 07-22-2011, 12:04 AM
  2. mod_security and a WordPress Plugin
    By ruicruz in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 07-11-2011, 04:53 AM
  3. WHM mod_security module - log file location
    By chips12 in forum Security
    Replies: 1
    Last Post: 11-23-2010, 10:41 AM
  4. mod_security plugin
    By MACscr in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 12-03-2008, 04:58 AM
  5. mod_security plugin apache2
    By manuxer in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 08-24-2007, 01:45 AM