Brute force IP blocking #2247
Replies: 13 comments 5 replies
-
|
Hi everyone, I didn't find anything in the documentation about passing public IP information during the request. Or maybe i just didn't see it. Is there a way to pass the public IP into OpenCloud logs? Thanks |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Did you configure the reverse proxy to forward the ip address |
Beta Was this translation helpful? Give feedback.
-
|
There is the OwnCloud stack, traefik, collabora, owncloud and collaboration. If i stop nftables, docker compose down, docker compose up -d the public IP is in the logs. |
Beta Was this translation helpful? Give feedback.
-
|
@flimmy Could you help? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Since nftables seems to be the culprit here, i would need to see your nftables config, but as an educated guess: this looks like an issue with Container routing. Docker networking is based on iptables chains. So anything messing with network traffic after going through the docker iptables chains will break something. Please have a look into docker and nftables interoperability. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the reply @flimmy Tell me what you need and I'll send you the files you need. Or tell me what i need to configure in the .env file. I tried OpenCloud locally on a VM, the behavior is the same (cloud.opencloud.test). Thank you |
Beta Was this translation helpful? Give feedback.
-
|
Hi, I would like to understand if it is possible to solve the problem. It's a production server, with WireGuard and other services installed. If this doesn't work, I'll rewrite all the rules in iptables. Thanks for the reply. |
Beta Was this translation helpful? Give feedback.
-
|
Docker's firewall is iptables. As soon as i start CrowdSec, it inserts the rules into nftables with the IPs already blocked. The only problem is that i can't capture the public IP of the request when the username and password are entered because the IP is changed to the Docker network IP. I've already implemented the CrowdSec configuration, i can analyze the container's real-time log, I've set both the number of retries and the blocking time, and it works. However, i need to disable what i did with CrowdSec. |
Beta Was this translation helpful? Give feedback.
-
|
I noticed that both nftables and iptables are installed on the two test VMs (one public and one private, which i only use for testing), which are not in production. The production server only has nftables. I'm starting to suspect that when i installed Docker, it also installed iptables, and i didn't notice. Debian uses nftables by default. I'll restore one of the two VMs to a clean state and check more carefully. |
Beta Was this translation helpful? Give feedback.
-
|
When i install Docker, following the official guide, it also installs iptables. I hadn't noticed that. I have to replace nftables with iptables and rewrite all the rules... I'm crying! Many thanks to all |
Beta Was this translation helpful? Give feedback.
-
|
Yes, Docker overrides the rules i wrote. I created a second publicly exposed VM using only Docker and OpenCloud, opening firewall ports 80 and 443. Everything works. Thanks everyone. |
Beta Was this translation helpful? Give feedback.




Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
i was looking at the Docker logs for the "opencloud-compose-opencloud-1" container in "/var/lib/docker/containers/id_container". When the login fails, i don't see the public IP, but "127.0.0.1:48400". I get a 203 status with the public IP in the next log, which doesn't indicate a login failure.
This is what it returns:
I'm analyzing the logs because i want to implement "CrowdSec" to block IPs that attempt to brute-force logins.
Is there a more accurate way to identify failed logins? Or is what i'm analyzing ok?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions