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

Suppress loggning of "clients connected" possible ? #6

Open
frank2b opened this issue Feb 4, 2021 · 4 comments
Open

Suppress loggning of "clients connected" possible ? #6

frank2b opened this issue Feb 4, 2021 · 4 comments

Comments

@frank2b
Copy link

frank2b commented Feb 4, 2021

When running the docker image the logs are quite big with "x clients connected" logging all the time.
It is not that easy to get the "real" errors.
Is there a way to set the log mode to "info/warning/error" ?
I only found the "-d" switch for activating debug.
Thx in advance
/Frank

@jcmoraisjr
Copy link
Owner

Hi, this repository is only a wrapper around contrib/modsecurity from haproxy. It seems to me that this can only be changed patching the source code. I do agree that it's a bit noisy.

@dhde
Copy link

dhde commented Jan 5, 2022

#16 will suppress this "clients connected" in logs

@KlugFR
Copy link

KlugFR commented Jun 22, 2022

#16 will suppress this "clients connected" in logs

I tried to implement your patches (got your Dockerfile, patch, start.sh, then build -t the image then run it).
But I have an issue, the config files don't seem to be found/read/used.

When running my built image:

# docker run --rm -p 12345:12345 david/waf
Using options: <default>
Using config files:
  - /etc/modsecurity/modsecurity.conf
  - /etc/modsecurity/owasp-modsecurity-crs.conf
1655916790.540683 [00] ModSecurity for nginx (STABLE)/2.9.5 (http://www.modsecurity.org/) configured.
1655916790.541071 [00] ModSecurity: APR compiled version="1.7.0"; loaded version="1.7.0"
1655916790.541268 [00] ModSecurity: PCRE compiled version="8.44 "; loaded version="8.44 2020-02-12"
1655916790.541451 [00] ModSecurity: YAJL compiled version="2.1.0"
1655916790.541550 [00] ModSecurity: LIBXML compiled version="2.9.14"
1655916790.541651 [00] ModSecurity: Status engine is currently disabled, enable it by set SecStatusEngine to On.

When running the original image:

# docker run --rm -p 12345:12345 quay.io/jcmoraisjr/modsecurity-spoa
Using options: <default>
Using config files:
  - /etc/modsecurity/modsecurity.conf
  - /etc/modsecurity/owasp-modsecurity-crs.conf
1655916819.173045 [00] ModSecurity for nginx (STABLE)/2.9.5 (http://www.modsecurity.org/) configured.
1655916819.173065 [00] ModSecurity: APR compiled version="1.7.0"; loaded version="1.7.0"
1655916819.173070 [00] ModSecurity: PCRE compiled version="8.44 "; loaded version="8.44 2020-02-12"
1655916819.173074 [00] ModSecurity: YAJL compiled version="2.1.0"
1655916819.173076 [00] ModSecurity: LIBXML compiled version="2.9.12"
1655916819.173113 [00] ModSecurity: StatusEngine call: "2.9.5,nginx,1.7.0/1.7.0,8.44/8.44 2020-02-12,(null),2.9.12,72"

Any idea what could be wrong?

@KlugFR
Copy link

KlugFR commented Jun 23, 2022

-v /etc/modsecurity:/etc/modsecurity kind of fixes the issue, the configuration that is on the host can be used this way.

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

4 participants