Skip to content

ipMatchFromFile gives error "Failed to open file" even when file exists #1674

Closed
@StefaanSeys

Description

@StefaanSeys

Hi,

When using this rule, nginx does not start and gives me the following error: "Failed to open file userdata_wl_IPs".

SecRule TX:REAL_IP "@ipMatchFromFile userdata_wl_IPs" \
        "id:210480,phase:1,allow,nolog,rev:3,severity:5,tag:'CWAF',tag:'Generic'"

The userdata_wl_IPS does exist in the same folder as the "rules.conf" file that refers to it. I also tried to copy the userdata file to some other folders higher up (e.g., in the folder of the main .conf file that in turn refers to rules.conf) - but always the same issue.

If I give an absolute path, nginx complains about the conf file containing errors.

This was tested on the v3/master branch of ModSecurity.
Running on nginx-1.13.8.
Compiled with "git clone --depth 1 https://github.com/SpiderLabs/ModSecurity-nginx.git".

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions