Skip to content
This repository has been archived by the owner on May 14, 2020. It is now read-only.

No fixed rule id "981050" #278

Closed
muxcc opened this issue Jan 19, 2016 · 4 comments
Closed

No fixed rule id "981050" #278

muxcc opened this issue Jan 19, 2016 · 4 comments

Comments

@muxcc
Copy link

muxcc commented Jan 19, 2016

Server version: Apache/2.4.10 (Debian)
Architecture: 64-bit
Server MPM: prefork

libapache2-mod-security2 (2.8.0-3)
modsecurity-crs (2.2.9-1)

/crs/modsecurity_crs_11_proxy_abuse.conf

If the fix in /etc/apache2/sites-enabled/site.conf

    <IfModule security2_module>
        SecRuleRemoveById  981050
    </IfModule>

The condition does not work and an error in site_error_log:

ModSecurity: Access denied with code 500 (phase 1). Match of "streq %{tx.geo_x-forwarded-for}" against "GEO:COUNTRY_CODE" required. [file "/etc/modsecurity'/crs/modsecurity_crs_11_proxy_abuse.conf"] [line "25"] [id "981050"] [rev "2.2.9"] [msg "Potential Open Proxy Abuse - GeoIP Country Code Mismatch of X-Forwarded-For Request Header and Client REMOTE_ADDR"]

The error in the logs is not lost.

@muxcc muxcc changed the title No fixed rule id "981 050" No fixed rule id "981050" Jan 20, 2016
@csanders-git
Copy link
Contributor

This is likely due to the fact that SecRuleRemoveById needs to be included AFTER the rule is declared. If it is written before it attempts to remove a non-existant rule ID. Sorry for the delay.

@csanders-git
Copy link
Contributor

Questions like this can be answered more quickly via the mailing list in the future sorry for the delay.

@muxcc
Copy link
Author

muxcc commented Feb 24, 2016

Yes, you are right, you need to set the boot order of the configuration files.
Thank you!

@csanders-git
Copy link
Contributor

no problem :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants