opnsense / opnsense/plugins

[os-crowdsec] Crowdsec does not start with multi-server setup (26.7)

Open
#5,587 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
1.2k
Forks
863
Avg merge
2d 6h
Merged PRs (30d)
10

Description

Describe the bug
When the plugin is setup to listen on 0.0.0.0, the local connection from OPNsense itself fails with
level=fatal msg="crowdsec init: while initializing LAPIClient: authenticate watcher (localhost): Post \"http://0.0.0.0:8080/v1/watchers/login\": performing jwt auth: dial tcp 0.0.0.0:8080: connect: network is unreachable"

If I change it back to 127.0.0.1, OPNsense itself can connect again, but all other connected machines (a NPMPlus LXC in my case) cannot.

This was working without any issues on the previous release, which in my case was 26.1 (the last version before 26.7 was released),

Expected behavior
Crowdsec should start :)

Screenshots
Current, not working settings, found under "https://FIREWALL-IP:8443/ui/crowdsec/general/index#settings"
Image

Environment

26.7.1_1 on amd64
running bare metal on a sophos 125 SG

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the setup in the CrowdSec General settings at the reported UI path, comparing the 0.0.0.0 and 127.0.0.1 listener configurations on OPNsense 26.7.1_1. Trace the local watcher authentication and remote connection configuration to identify why the local connection uses 0.0.0.0; done means CrowdSec starts while both OPNsense and connected machines can connect.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.