Skip to content

constant "bad user agent" in crowdsec.log #12

@catharsis71

Description

@catharsis71

when the module attempts to communicate the the local API, it apparently sets the user agent header to "Apache/2.4.58 (Ubuntu) OpenSSL/3.0.13 mod_fcgid/2.3.9 mod_perl/2.0.13 Perl/v5.38.2" which the local API doesn't seem to like:

time="2025-05-01T17:22:07-05:00" level=warning msg="bad user agent 'Apache/2.4.58 (Ubuntu) OpenSSL/3.0.13 mod_fcgid/2.3.9 mod_perl/2.0.13 Perl/v5.38.2'" ip=127.0.0.1 name=cs-apache2-bouncer-1746122067
time="2025-05-01T17:22:12-05:00" level=warning msg="bad user agent 'Apache/2.4.58 (Ubuntu) OpenSSL/3.0.13 mod_fcgid/2.3.9 mod_perl/2.0.13 Perl/v5.38.2'" ip=127.0.0.1 name=cs-apache2-bouncer-1746122067
time="2025-05-01T17:22:17-05:00" level=warning msg="bad user agent 'Apache/2.4.58 (Ubuntu) OpenSSL/3.0.13 mod_fcgid/2.3.9 mod_perl/2.0.13 Perl/v5.38.2'" ip=127.0.0.1 name=cs-apache2-bouncer-1746122067
time="2025-05-01T17:22:20-05:00" level=warning msg="bad user agent 'Apache/2.4.58 (Ubuntu) OpenSSL/3.0.13 mod_fcgid/2.3.9 mod_perl/2.0.13 Perl/v5.38.2'" ip=127.0.0.1 name=cs-apache2-bouncer-1746122067

this user agent is similar to what Apache sets as the Server: response header if you have ServerTokens Full enabled, however, I don't have Full enabled, I'm using the minimal value, ServerTokens Prod, which sets the response header Server: Apache but it doesn't appear to change the user-agent of requests initiated by crowdsec-apache2-bouncer to the local API.

I don't know exactly what the local API will & won't complain about in terms of User-Agent but setting it to something simple like just Apache would probably make it stop complaining?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions