CSF not working correctly with docker

Post Reply
panomitrius
Junior Member
Posts: 4
Joined: 20 Dec 2020, 11:05

CSF not working correctly with docker

Post by panomitrius »

Hi!

I've recently installed CSF on an Ubuntu server 20.04, where I also run a docker daemon. I've found that the standard docker-options in the configuration doesn't give my containers network access with adequate port forwarding. I've tried some workarounds, such as using putting

Code: Select all

service docker restart
inside csfpost.sh. That's perhaps not that elegant but it works after a fresh enable or restart with CSF. However after a couple of hours CSF updates the rules and the docker containers looses their iptables rules again and get inaccessible. What could I do to work around this?

Perhaps setting the
FASTSTART = "0"?

I'll experiment a bit more with this later when I can monitor more carefully what the effects are.
panomitrius
Junior Member
Posts: 4
Joined: 20 Dec 2020, 11:05

Re: CSF not working correctly with docker

Post by panomitrius »

I found a solution, using this script: https://github.com/juli3nk/csf-post-docker, but modifying it and providing the full path to each iptables and docker command. Perhaps this could be integrated into the default CSF docker configuration?
klodoma
Junior Member
Posts: 5
Joined: 19 Sep 2019, 14:18

Re: CSF not working correctly with docker

Post by klodoma »

I am also using:https://github.com/juli3nk/csf-post-docker

I am currently setting up a new server and I am wondering if there is already something build in csf to cover this case?
marketinglootsale
Junior Member
Posts: 1
Joined: 24 Feb 2021, 11:27

Re: CSF not working correctly with docker

Post by marketinglootsale »

Script is not running correctly when CSF refreshes the rules automatically, but works fine when used together with csf -r. #19
Post Reply