Skip to content

Modsecurity + Nginx Only warnings in log file, no blocking of attacks #113

Closed
@AnnuA

Description

@AnnuA

I have Nginx 1.14.0, Modsecurity 3 with nginx connector. Owasp 3.0.0. Ubuntu -14.04.

Modsecurity is not blocking attacks although warning logs can be seen in /var/log/modsec_audit.log.
Also, I do have SecRuleEngine On in my modsecurity.conf.
Also, replaced "Include /usr/local/owasp-modsecurity-crs/rules/*.conf" with list of individual conf file as answered in SpiderLabs/owasp-modsecurity-crs#777 .
Why it is not blocking the attack?

Below is my /etc/nginx/conf.d/default.conf file contents:

server {
    listen       80;
    server_name  localhost;

    modsecurity on;
    modsecurity_rules_file /etc/nginx/modsec/main.conf;

    #charset koi8-r;
    #access_log  /var/log/nginx/host.access.log  main;

    location / {
        root   /usr/share/nginx/html;
        index  index.html index.htm;
        proxy_pass http://192.168.100.145:8080/;
    }

Is it something related with anomaly score? because attack is blocked when Self-contained mode is enabled instead of Anomaly mode(Default) in /usr/local/owasp-modsecurity-crs-3.0.0/crs-setup.conf.

I have attached modsec_audit.log.
modsec_audit.log

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions