Skip to content

[os-crowdsec]fix issue 5587 - #5601

Open
sabban wants to merge 2 commits into
opnsense:masterfrom
crowdsecurity:fix/5587
Open

[os-crowdsec]fix issue 5587#5601
sabban wants to merge 2 commits into
opnsense:masterfrom
crowdsecurity:fix/5587

Conversation

@sabban

@sabban sabban commented Aug 5, 2026

Copy link
Copy Markdown

Important notices

Before you submit a pull request, we ask you kindly to acknowledge the following:

If AI was used, please disclose:

  • Model used: gpt-5.5
  • Extent of AI involvement:
    It wrote the code (it's few lines of python)
    I reviewed it, built the package with standard opnsense build suite and tested it on ec2 instances with opnsense 26.7

Describe the problem

os-crowdsec can generate a Local API (LAPI) configuration where 0.0.0.0 is used both as the server listen address and as the local client URL for the CrowdSec agent and firewall bouncer. On older OPNsense/FreeBSD releases this happened to work because FreeBSD allowed TCP connections to INADDR_ANY/0.0.0.0. After the move to FreeBSD 15 in OPNsense 26.7, those connections are rejected with a "network is unreachable" error, causing CrowdSec startup/authentication against the local LAPI to fail.


Describe the proposed solution

Explain what this pull request changes and why.
• Issue #5587 was fixed by separating the address used to bind the CrowdSec LAPI from the address used by local clients to connect to it, while changing the plugin as little as possible for now.

The plugin still writes the configured LAPI listen address to config.yaml:

api.server.listen_uri: 0.0.0.0:8080

But when generating local client URLs for:

local_api_credentials.yaml
bouncers/crowdsec-firewall-bouncer.yaml

it now maps wildcard listen addresses to loopback:

0.0.0.0 -> 127.0.0.1
:: -> ::1

This keeps the current UI and configuration model intact. I plan to further enhance the plugin with WAF capabilities in the next few weeks/months, and I’ll add a dedicated setting option at that time.
I changed the maintainer to manuel@crowdsec.net because I will maintain the plugin from now on.


Related issue

If this pull request relates to an issue, link it here. This issue fixes the issue #5587

@sabban sabban changed the title fix issue https://github.com/opnsense/plugins/issues/5587 [os-crowdsec]fix issue 5587 Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants