Skip to content

reverse proxy + apache 2.4 + modsecurity-2.8.0 scoreboard #780

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

Closed
ton31337 opened this issue Oct 3, 2014 · 1 comment
Closed

reverse proxy + apache 2.4 + modsecurity-2.8.0 scoreboard #780

ton31337 opened this issue Oct 3, 2014 · 1 comment
Assignees

Comments

@ton31337
Copy link

ton31337 commented Oct 3, 2014

Hi all,

I face a problem passing client's IP from reverse proxy to modsecurity. Scoreboard info always shows c->client_ip instead of r->useragent_ip. Diving into source there isn't any way to change modsecurity to fetch r->useragent_ip. Function's parameter is only conn_rec.

I tried to set using mod_remoteip IP variable to c->notes table, and fetching it inside mod_security2.c, but with no success.

I have to comment the whole function because we don't need any information about global scoreboards, etc.

--- modsecurity-2.8.0/apache2/mod_security2.c 2014-10-03 08:11:43.960123305 +0000
+++ modsecurity-2.8.0/apache2/mod_security2.c 2014-10-03 08:12:20.293007633 +0000
@@ -1373,8 +1373,7 @@ static int hook_connection_early(conn_re
     char *error_msg;
     worker_score *ws_record = NULL;
 #if AP_SERVER_MAJORVERSION_NUMBER > 1 && AP_SERVER_MINORVERSION_NUMBER > 2
-    ap_sb_handle_t *sbh = NULL;
-    char *client_ip = conn->client_ip;
+    return DECLINED;
 #else
     char *client_ip = conn->remote_ip;
 #endif
@zimmerle zimmerle self-assigned this May 5, 2017
@zimmerle
Copy link
Contributor

Fixed. #1340.

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

2 participants