Make CSF work with docker #51
-
|
Is there any guide or recommended approach to get CSF working with Docker? I have set I have nginx running on the host as a proxy which proxies requests to containers listening on 127.0.0.1 Eg: But when I try to access this site I get: Have also tried adding this to But the error persists. Also adding DOCKER=1 on Debian 13 results in some errors when restarting csf: What does work is adding |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
So, the short version is this. The current docker functionality in CSF is limited. A long time ago, I wrote this https://raw.githubusercontent.com/Aetherinox/csf-firewall/refs/heads/main/extras/scripts/docker.sh However, that script is from roughly months ago. It makes docker and CSF work much better. But I need to either
Because the current functionality of my script loops through your entire docker network and adds those docker lan IPs to the CSF whitelist. However, some people may not want that. It doesn't open the port so that the outside world can access it, it simply allows for communication to happen locally. Then you can attach the docker container to things like Traefik. If you want, you can open the helper script I linked, and see the process I use in there to grant a container access to get by CSF. The iptable rules sit in there. I just need to dedicate some time to polishing CSF / Docker integration, but there's a bunch of stuff on the list right now I'm trying to push out. |
Beta Was this translation helpful? Give feedback.
So, the short version is this.
The current docker functionality in CSF is limited.
A long time ago, I wrote this https://raw.githubusercontent.com/Aetherinox/csf-firewall/refs/heads/main/extras/scripts/docker.sh
However, that script is from roughly months ago. It makes docker and CSF work much better. But I need to either
Because the current functionality of my script loops through your entire docker network and adds those docker lan IPs to the CSF whitelist. However, some people may not want that. It doesn't open the port so that the outside world can access it, it simply allows for commun…