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

I'm having trouble importing the modsecurity module into nginx. #3317

Open
MuhammetAliKara opened this issue Dec 23, 2024 · 5 comments
Open
Labels
2.x Related to ModSecurity version 2.x

Comments

@MuhammetAliKara
Copy link

MuhammetAliKara commented Dec 23, 2024

Hey,
Even though I made all the installations perfectly, the load module part I added to the conf configuration does not work at all.

**ldd** =         libcurl-gnutls.so.4 => /lib/x86_64-linux-gnu/libcurl-gnutls.so.4 (0x0000788ec6745000)
                          libGeoIP.so.1 => /lib/x86_64-linux-gnu/libGeoIP.so.1 (0x0000788ec6a82000)
                          libxml2.so.2 => /lib/x86_64-linux-gnu/libxml2.so.2 (0x0000788ec6563000)
                          liblua5.3.so.0 => /lib/x86_64-linux-gnu/liblua5.3.so.0 (0x0000788ec6a44000)
                          libpcre2-8.so.0 => /lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x0000788ec64c9000)
                          libmaxminddb.so.0 => /lib/x86_64-linux-gnu/libmaxminddb.so.0 (0x0000788ec6a3d000)
                          libfuzzy.so.2 => /lib/x86_64-linux-gnu/libfuzzy.so.2 (0x0000788ec6a36000)
                          libyajl.so.2 => /lib/x86_64-linux-gnu/libyajl.so.2 (0x0000788ec6a2a000)
                          libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x0000788ec6200000)
                          /lib64/ld-linux-x86-64.so.2 (0x0000788ec6cc6000)
                          libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x0000788ec649b000)
                          libnghttp2.so.14 => /lib/x86_64-linux-gnu/libnghttp2.so.14 (0x0000788ec61d5000)
                          libidn2.so.0 => /lib/x86_64-linux-gnu/libidn2.so.0 (0x0000788ec61b3000)
                          librtmp.so.1 => /lib/x86_64-linux-gnu/librtmp.so.1 (0x0000788ec6195000)
                          libssh.so.4 => /lib/x86_64-linux-gnu/libssh.so.4 (0x0000788ec6124000)
                          libpsl.so.5 => /lib/x86_64-linux-gnu/libpsl.so.5 (0x0000788ec6a12000)
                          libnettle.so.8 => /lib/x86_64-linux-gnu/libnettle.so.8 (0x0000788ec60cf000)
                          libgnutls.so.30 => /lib/x86_64-linux-gnu/libgnutls.so.30 (0x0000788ec5ed5000)
                          libgssapi_krb5.so.2 => /lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x0000788ec5e81000)
                          libldap.so.2 => /lib/x86_64-linux-gnu/libldap.so.2 (0x0000788ec5e24000)
                          liblber.so.2 => /lib/x86_64-linux-gnu/liblber.so.2 (0x0000788ec648b000)
                          libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x0000788ec5d6a000)
                          libbrotlidec.so.1 => /lib/x86_64-linux-gnu/libbrotlidec.so.1 (0x0000788ec5d5c000)
                          libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x0000788ec5d40000)
                          libicuuc.so.74 => /lib/x86_64-linux-gnu/libicuuc.so.74 (0x0000788ec5a00000)
                          liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x0000788ec5d0e000)
                          libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x0000788ec5c25000)
                          libunistring.so.5 => /lib/x86_64-linux-gnu/libunistring.so.5 (0x0000788ec5853000)
                          libhogweed.so.6 => /lib/x86_64-linux-gnu/libhogweed.so.6 (0x0000788ec580b000)
                          libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x0000788ec5787000)
                          libcrypto.so.3 => /lib/x86_64-linux-gnu/libcrypto.so.3 (0x0000788ec5200000)
                          libp11-kit.so.0 => /lib/x86_64-linux-gnu/libp11-kit.so.0 (0x0000788ec505c000)
                          libtasn1.so.6 => /lib/x86_64-linux-gnu/libtasn1.so.6 (0x0000788ec5c0f000)
                          libkrb5.so.3 => /lib/x86_64-linux-gnu/libkrb5.so.3 (0x0000788ec4f93000)
                          libk5crypto.so.3 => /lib/x86_64-linux-gnu/libk5crypto.so.3 (0x0000788ec575b000)
                          libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x0000788ec647f000)
                          libkrb5support.so.0 => /lib/x86_64-linux-gnu/libkrb5support.so.0 (0x0000788ec574e000)
                          libsasl2.so.2 => /lib/x86_64-linux-gnu/libsasl2.so.2 (0x0000788ec5734000)
                          libbrotlicommon.so.1 => /lib/x86_64-linux-gnu/libbrotlicommon.so.1 (0x0000788ec4f70000)
                          libicudata.so.74 => /lib/x86_64-linux-gnu/libicudata.so.74 (0x0000788ec3200000)
                          libffi.so.8 => /lib/x86_64-linux-gnu/libffi.so.8 (0x0000788ec5728000)
                          libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x0000788ec571f000)
                          libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x0000788ec31ed000)

------------------------     ------------     ------------     ------------     ------------     ------------     ------------     ------------     ------------     ------------       
                          **_Problem Info_** = sudo nginx -t
2024/12/23 10:19:30 [emerg] 2171186#2171186: dlopen() "/etc/nginx/modules/ngx_http_modsecurity_module.so" failed (/etc/nginx/modules/ngx_http_modsecurity_module.so: undefined symbol: pcre_malloc) in /etc/nginx/nginx.conf:6
nginx: configuration file /etc/nginx/nginx.conf test failed
------------     ------------     ------------     ------------     ------------     ------------     ------------     ------------     ------------     ------------     ------------     
**_nginx installed version_** = nginx-1.24.0 

Can you help me solve my problem?
Thanks in advance.

@MuhammetAliKara MuhammetAliKara added the 2.x Related to ModSecurity version 2.x label Dec 23, 2024
@MuhammetAliKara MuhammetAliKara changed the title 2024/12/23 10:19:30 [emerg] 2171186#2171186: dlopen() "/etc/nginx/modules/ngx_http_modsecurity_module.so" failed (/etc/nginx/modules/ngx_http_modsecurity_module.so: undefined symbol: pcre_malloc) in /etc/nginx/nginx.conf:6 nginx: configuration file /etc/nginx/nginx.conf test failed I'm having trouble importing the modsecurity module into nginx. Dec 23, 2024
@airween
Copy link
Member

airween commented Dec 28, 2024

Could you show us your output of this command?

ldd /etc/nginx/modules/ngx_http_modsecurity_module.so

@MuhammetAliKara
Copy link
Author

I provided the ldd outputs in the issues description, as you can see above.

@airween
Copy link
Member

airween commented Dec 28, 2024

@MuhammetAliKara

I provided the ldd outputs in the issues description, as you can see above.

okay, then please clarify what is the mentioned output above? Dependency list of libmodsecurity3 or ngx_http_modsecurity_module.so? Please show us the other one's dependency.

@MuhammetAliKara
Copy link
Author

The dependency list of ngx_http_modsecurity_module.so.

@airween
Copy link
Member

airween commented Dec 28, 2024

The dependency list of ngx_http_modsecurity_module.so.

Then please show us the other one's dependency.

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

No branches or pull requests

2 participants