Closed
Description
What happened?
Hi,
I am using redis to persist bans (bw version 1.6.2-rc2). It is configured as such :
USE_REDIS: yes
REDIS_HOST: bunkerweb-redis
bunkerweb-redis:
image: redis:7-alpine
container_name: bunkerweb-redis
restart: unless-stopped
environment:
<<: *all-common
networks:
- bunkerweb-redis
volumes:
- ${CONFIG_FOLDER}/bunkerweb/redis:/data
healthcheck:
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
start_period: 20s
interval: 30s
retries: 5
timeout: 3s
bunkerweb-main and bunkerweb-ui are also in the bunkerweb-redis docker network.
Bunkerweb-main does not throw any error when trying to connect to redis at container start. So it is working.
But when I try to do bwcli unban XXXXXXX to unban an ip, I am having the following error:
b87cb053ceb7:~$ bwcli unban XXXXXX
[2025-05-24 12:12:20 +0200] [CLI] [44526] [ℹ️ ] - Getting variables from database
[2025-05-24 12:12:20 +0200] [CLI] [44526] [ℹ️ ] - ✅ Database connection established
[2025-05-24 12:12:21 +0200] [CLI] [44526] [ℹ️ ] - Connecting to Redis at bunkerweb-redis:6379
[2025-05-24 12:12:26 +0200] [CLI] [44526] [❌] - Failed to connect to Redis: Error -3 connecting to bunkerweb-redis:6379. Try again.
[2025-05-24 12:12:26 +0200] [CLI] [44526] [❌] - Failed to connect to Redis, disabling Redis functionality
[2025-05-24 12:12:26 +0200] [API] [44526] [ℹ️ ] - Successfully sent API request to http://bunkerweb-main:5000/unban
[2025-05-24 12:12:26 +0200] [CLI] [44526] [ℹ️ ] - CLI command status : ✔️ (success)
✅ SUCCESS
────────────────────────────────────────────────────────────────────────────────
• 🔓 IP XXXXXX has been unbanned globally
────────────────────────────────────────────────────────────────────────────────
b87cb053ceb7:~$
The unban does not work, the ip is still banned.
Would you have an idea why ?
Thanks in advance for any answer.
How to reproduce?
- Install bw 1.6.2-rc2
- Install redis with the compose above
- Configure bw as above
- Check that bw connects to redis at startup
- Try to unban a banned ip
Configuration file(s) (yaml or .env)
USE_REDIS: yes
REDIS_HOST: bunkerweb-redis
Relevant log output
b87cb053ceb7:~$ bwcli unban XXXXXX
[2025-05-24 12:12:20 +0200] [CLI] [44526] [ℹ️ ] - Getting variables from database
[2025-05-24 12:12:20 +0200] [CLI] [44526] [ℹ️ ] - ✅ Database connection established
[2025-05-24 12:12:21 +0200] [CLI] [44526] [ℹ️ ] - Connecting to Redis at bunkerweb-redis:6379
[2025-05-24 12:12:26 +0200] [CLI] [44526] [❌] - Failed to connect to Redis: Error -3 connecting to bunkerweb-redis:6379. Try again.
[2025-05-24 12:12:26 +0200] [CLI] [44526] [❌] - Failed to connect to Redis, disabling Redis functionality
[2025-05-24 12:12:26 +0200] [API] [44526] [ℹ️ ] - Successfully sent API request to http://bunkerweb-main:5000/unban
[2025-05-24 12:12:26 +0200] [CLI] [44526] [ℹ️ ] - CLI command status : ✔️ (success)
✅ SUCCESS
────────────────────────────────────────────────────────────────────────────────
• 🔓 IP XXXXXX has been unbanned globally
────────────────────────────────────────────────────────────────────────────────
b87cb053ceb7:~$
BunkerWeb version
1.6.2-rc2
What integration are you using?
Docker
Linux distribution (if applicable)
OpenMediaVault
Removed private data
- I have removed all private data from the configuration file and the logs
Code of Conduct
- I agree to follow this project's Code of Conduct