csf-post-docker icon indicating copy to clipboard operation
csf-post-docker copied to clipboard

Fix issues with Docker bridge networks

Open dsnopek opened this issue 8 years ago • 1 comments

We have a bunch of services running on Docker bridged networks via docker-compose. The current script doesn't setup all the iptables rules exactly like the Docker daemon, which would cause everything to break everytime 'csf' got restarted. This PR contains the fixes that worked for me!

I used iptables-save to dump the rules that get setup by starting CSF then the Docker daemon without this script. Then I added the script, restarted CSF and iptables-save to dump the rules generated by this script, and compared them via diff - the only difference with my PR is the order that containers or networks are added, which is really just a difference in the order when looping - in everyway that matters the result is the same in our testing!

dsnopek avatar Nov 09 '16 15:11 dsnopek

Good! I will look at it. Thanks

ghost avatar Nov 09 '16 17:11 ghost