[os-crowdsec]fix issue 5587 - #5601
Open
sabban wants to merge 2 commits into
Open
Conversation
blotus
approved these changes
Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important notices
Before you submit a pull request, we ask you kindly to acknowledge the following:
If AI was used, please disclose:
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