Highlights
Docker's firewall rules now stay in effect on DSM. DSM reloads its firewall a few seconds after every container start or stop, and that reload dropped the jumps into Docker's DOCKER-USER and DOCKER-FORWARD chains. Nothing visibly broke, but DOCKER-USER rules were ignored, and containers on internal: true networks could be reached from other containers. A small guard, started with Container Manager, now puts the jumps back within a couple of seconds of each reload (#134).
- On units where DSM's
iptablesredirects rules into its ownDEFAULT_FORWARDchain, the guard works with that chain. On those units, Docker's rules always apply after the DSM firewall, regardless of theplacementsetting. See DSM firewall and published ports. - New option:
placement=after-firewallmakes published container ports pass the DSM firewall first. See the same section.
Bridge networks work again on 3.x kernels. On models with a 3.x kernel (such as 3.10), containers on bridge networks couldn't reach the NAS, the LAN, or the internet. The same guard now repairs each Docker bridge once, including bridges created later and those DSM's Docker package created before the update (#116).
Thanks
- @K109RDC for the #134 report, tracing the cause in DSM, and several rounds of testing on a DS220+.
- @KusAdama for reporting #116 and testing the diagnosis, the workaround, and the fix on a DS415+.
- @azrael-229 for confirming #116 on a DS216+ and catching that the first fix missed
docker-<id>bridges. - @telnetdoogie for reproducing #134 and validating the fix.
Updating
cd synology-docker
git pull
sudo ./syno_docker_update.sh updateAlready on the latest Docker? Run sudo ./syno_docker_update.sh only_script instead, then restart Container Manager to start the guard.
New here, or still have containers on the db logger? Follow the README first.
To use exactly this version, run git checkout 3.3.0 in your copy (git checkout main returns to the latest), or download synology-docker.tar.gz below.
What's Changed
- fix(forwarding): restore Docker FORWARD jumps after DSM firewall rewrites (fixes #134) by @bslatyer in #135
- fix(network): repair Docker bridge addresses on 3.x kernels (fixes #116) by @bslatyer in #137
- fix(forwarding): keep the guard's jumps working with DSM's DEFAULT_FORWARD redirect (fixes #134) by @bslatyer in #140
Full Changelog: 3.2.0...3.3.0