Hi there,
I'm trying to migrate from opensense to openwrt but the process is quiet difficult. Currently I'm trying to get Crowdsec running but after a successful installation and configuration Crowdsec is not blocking traffic that was added by f.e. a manual decision.
In the file /var/log/crowdsec-firewall-bouncer.log I can see that the decission was added to the chains of crowdsec but it won't block anything.
time="2025-10-27T20:18:47Z" level=info msg="Starting crowdsec-firewall-bouncer "
time="2025-10-27T20:18:47Z" level=info msg="backend type: nftables"
time="2025-10-27T20:18:47Z" level=info msg="IPV6 is disabled"
time="2025-10-27T20:18:47Z" level=info msg="nftables initiated"
time="2025-10-27T20:18:47Z" level=info msg="Using API key auth"
time="2025-10-27T20:18:47Z" level=info msg="Processing new and deleted decisions . . ."
time="2025-10-27T20:18:48Z" level=info msg="1550 decisions deleted"
time="2025-10-27T20:18:48Z" level=info msg="Created set and rule for origin CAPI and type ipv4_addr in chain crowdsec-chain-input"
time="2025-10-27T20:18:48Z" level=info msg="Created set and rule for origin CAPI and type ipv4_addr in chain crowdsec-chain-forward"
time="2025-10-27T20:18:48Z" level=info msg="13467 decisions added"
time="2025-10-27T20:19:17Z" level=info msg="Created set and rule for origin cscli and type ipv4_addr in chain crowdsec-chain-forward"
time="2025-10-27T20:19:17Z" level=info msg="Created set and rule for origin cscli and type ipv4_addr in chain crowdsec-chain-input"
time="2025-10-27T20:19:17Z" level=info msg="1 decision added"
The manually added ip is also added to the nft table of crowdsec
root@OpenWrt:~# nft list tables
table inet fw4
table ip crowdsec
root@OpenWrt:~# nft list table crowdsec
...
...
223.221.36.42 timeout 6d22h8m51s170ms expires 6d22h6m49s550ms,
223.221.38.226 timeout 4d20h56m8s170ms expires 4d20h54m6s550ms,
223.223.177.215 timeout 5d19h8m51s170ms expires 5d19h6m49s550ms,
223.241.214.127 timeout 1d10h56m8s170ms expires 1d10h54m6s550ms,
223.241.247.214 timeout 6d21h8m51s170ms expires 6d21h6m49s550ms,
223.243.24.178 timeout 3d23h56m8s170ms expires 3d23h54m6s550ms,
223.244.25.6 timeout 4d21h56m8s170ms expires 4d21h54m6s550ms,
223.247.33.150 timeout 6d20h8m51s170ms expires 6d20h6m49s550ms,
223.247.218.112 timeout 6d22h8m51s170ms expires 6d22h6m49s550ms }
}
set crowdsec-blacklists-cscli {
type ipv4_addr
flags timeout
elements = { 192.168.2.208 timeout 4m53s310ms expires 3m21s50ms }
}
chain crowdsec-chain-input {
type filter hook input priority filter + 4; policy accept;
ct state established,related accept
iifname != "eth0" accept
counter name "processed"
ip saddr @crowdsec-blacklists-CAPI counter name "crowdsec-blacklists-CAPI" drop
ip saddr @crowdsec-blacklists-cscli counter name "crowdsec-blacklists-cscli" drop
}
chain crowdsec-chain-forward {
type filter hook forward priority filter + 4; policy accept;
ct state established,related accept
iifname != "eth0" accept
counter name "processed"
ip saddr @crowdsec-blacklists-CAPI counter name "crowdsec-blacklists-CAPI" drop
ip saddr @crowdsec-blacklists-cscli counter name "crowdsec-blacklists-cscli" drop
}
}
I'm testing the block by using a port forwarding to a test machine. Testing the same command on a opnsense box is working fine and blocking the traffic on openWRT this is not happing and I don't know why.
Can someone help?
Regards,
Shorty