Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apache connector 3.0 not factoring in RemoteIPHeader like mod_security2 #81

Open
drmuey opened this issue Apr 15, 2021 · 2 comments
Open

Comments

@drmuey
Copy link

drmuey commented Apr 15, 2021

  1. install mod_remoteip && RemoteIPHeader X-Forwarded-For
  2. install 3.0 apache connector
  3. do a hit w/ X-Forwarded-For: 1.2.3.4
  4. 1.2.3.4 is not what is in the audit log
  5. try again w/ mod_security2
  6. 1.2.3.4 is what is in the audit log

Our friends at immunify 360 who noticed this may have more detailed reproduction steps or other info to add.

Note: at this time we have not tried to see is the NGINX connector behaves the same or not.

@zimmerle
Copy link
Contributor

zimmerle commented Apr 15, 2021

@drmuey Apache version for 3.0 is not yet ready for production. Please use the version 2.x

@robbytx
Copy link

robbytx commented Jun 5, 2021

In order to get the real IP to appear in the ModSecurity audit log, I've come up with the workaround of adding it to a header before the RemoteIP module takes effect ModSecurity reads the headers (but apparently after the RemoteIP module takes effect):

RequestHeader append X-Connecting-IP "%{REMOTE_ADDR}s" early

It's admittedly a hack, and the documentation discourages use of the early option, but it's working for me. YMMV.

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

No branches or pull requests

3 participants