curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.deb.sh | bash
apt install crowdsec-firewall-bouncer-iptables
cscli console enroll xxxxxxxxxxxxxxxxxxxxx
With no error.
BUT
Bouncer doesnt start with: /var/log/crowdsec-firewall-bouncer.log crowdsec error msg="unable to configure bouncer: config does not contain LAPI key or certificate"
and
journald -xe
-- The job identifier is 5856.
Sep 30 12:57:31 vps crowdsec-firewall-bouncer[19055]: time="2022-09-30T12:57:31Z" level=info msg="crowdsec-firewall-bouncer v0.0.24-debian-pragmatic-8e00af2c9e83af22deab8c0c49a4ad9b8fc57a3f"
Sep 30 12:57:31 vpscrowdsec-firewall-bouncer[19055]: time="2022-09-30T12:57:31Z" level=info msg="config is valid"
Sep 30 12:57:31 vpscrowdsec-firewall-bouncer[19060]: time="2022-09-30T12:57:31Z" level=info msg="crowdsec-firewall-bouncer v0.0.24-debian-pragmatic-8e00af2c9e83af22deab8c0c49a4ad9b8fc57a3f"
Sep 30 12:57:33 vps systemd[1]: crowdsec-firewall-bouncer.service: Failed with result 'protocol'.
and:
crowdsec-firewall-bouncer-v0.0.24-rc1# systemctl restart cs-firewall-bouncer
Failed to restart cs-firewall-bouncer.service: Unit cs-firewall-bouncer.service not found.
you have to register the bouncer with the crowdsec agent:
$ sudo cscli bouncers add some-name
Api key for 'some-name':
17e6bd946922cd0fb8e52de6beba8af3
Please keep this key since you will not be able to retrieve it!
and then add the above api key to the bouncer config file, e. g. /etc/crowdsec/bouncers/crowdsec-firewall-bouncer.yaml api_key: 17e6bd946922cd0fb8e52de6beba8af3 and then restart the bouncer systemd file.
As @xathuo (thanks btw!) pointed out, you need to register your bouncer.
However, if cscli is available on the same machine, the install should do it automatically.
If it was not the case, can you let us know which distribution etc. you were using ?
Hello, I have same problem firewall-bouncers doesn’t start
# systemctl status crowdsec-firewall-bouncer.service
● crowdsec-firewall-bouncer.service - The firewall bouncer for CrowdSec
Loaded: loaded (/etc/systemd/system/crowdsec-firewall-bouncer.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Wed 2023-11-22 08:01:19 CET; 7min ago
...
Nov 22 08:01:19 erp systemd[1]: Started The firewall bouncer for CrowdSec.
cscli bouncers list
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Name IP Address Valid Last API pull Type Version Auth Type
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
FirewallBouncer-1678756336 127.0.0.1 ✔️ 2023-10-11T13:10:26Z crowdsec-firewall-bouncer v0.0.25-debian-pragmatic-0a4fde8e9440927d02ce187d1716306af9a13780 api-key
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Api-key is registred in /etc/crowdsec/bouncers/crowdsec-firewall-bouncer.yaml
Hey, I’ve the same error, please into your /etc/crowdsec/bouncers/crowdsec-firewall-bouncer.yaml in api_url option indique your docker ip crowdsec, example : api_url: http://192.168.160.3:8080/
You can view ip with command docker inspect crowdsec