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

angie 1.2.0 and modsecurity #31

Closed
emiliocamposmartin opened this issue Jun 1, 2023 · 7 comments
Closed

angie 1.2.0 and modsecurity #31

emiliocamposmartin opened this issue Jun 1, 2023 · 7 comments
Labels
question Question about product

Comments

@emiliocamposmartin
Copy link

HI, I have tried to compile angie with modsecurity as follow:

1-COmpile modsecurity 2.9.1 in standalone
2-Compile Angie 1.2.0 adding the module compiled in the configure (--add-module=../modsecurity-2.9.1/nginx/modsecurity), in the make the following error is shown:

/opt/modsec/modsecurity-2.9.1/nginx/modsecurity//ngx_http_modsecurity.c

/opt/modsec/modsecurity-2.9.1/nginx/modsecurity//ngx_http_modsecurity.c: In function ‘ngx_http_modsecurity_save_headers_in’:
/opt/modsec/modsecurity-2.9.1/nginx/modsecurity//ngx_http_modsecurity.c:358:39: error: ‘ngx_http_headers_in_t’ {aka ‘struct ’} has no member named ‘cookies’; did you mean ‘cookie’?
if (ngx_array_init(&r->headers_in.cookies, r->pool, 2,
^~~~~~~
cookie
/opt/modsec/modsecurity-2.9.1/nginx/modsecurity//ngx_http_modsecurity.c: In function ‘ngx_http_modsecurity_save_request_body’:
/opt/modsec/modsecurity-2.9.1/nginx/modsecurity//ngx_http_modsecurity.c:531:17: error: ‘ngx_http_connection_t’ {aka ‘struct ’} has no member named ‘nfree’; did you mean ‘free’?
if (hc->nfree && size == cscf->large_client_header_buffers.size) {
^~~~~
free
/opt/modsec/modsecurity-2.9.1/nginx/modsecurity//ngx_http_modsecurity.c:533:34: error: ‘ngx_http_connection_t’ {aka ‘struct ’} has no member named ‘nfree’; did you mean ‘free’?
buf = hc->free[--hc->nfree];
^~~~~
free
make[1]: *** [objs/Makefile:1304: objs/addon/modsecurity/ngx_http_modsecurity.o] Error 1

Is mod security supported in Angie? I tried modsecurity version 2.9.1 maybe another version is required.

Thanks!

@VBart
Copy link
Contributor

VBart commented Jun 1, 2023

ModSecurity 2.9.1 isn't compatible with nginx 1.23 and above, while Angie 1.2.0 is based on nginx 1.25.
See here: owasp-modsecurity/ModSecurity#2882 - you should try to build with ModSecurity v3.0.x.

@emiliocamposmartin
Copy link
Author

emiliocamposmartin commented Jun 1, 2023 via email

@VBart VBart added the question Question about product label Aug 10, 2023
@ihard
Copy link

ihard commented Sep 19, 2023

Are there any plans to build the module similarly to the others?

@VBart
Copy link
Contributor

VBart commented Sep 19, 2023

Are there any plans to build the module similarly to the others?

^^ @lonerr

@lonerr
Copy link

lonerr commented Sep 19, 2023

Are there any plans to build the module similarly to the others?

I think we should at least try.
Thank you for idea.

@lonerr
Copy link

lonerr commented Dec 6, 2023

@ihard, We've just released angie-module-modsecurity packages for all supported platforms:
https://angie.software/en/howto/modsecurity/

Please have a look and let us know how it helps.

@ihard
Copy link

ihard commented Dec 14, 2023

works great, thanks!

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

No branches or pull requests

5 participants