Re:Hacker deleted all of NewsBlur’s Mongo data and is now ho...
by sascha_sl on Thursday June 24, 2021 @02:49AM
(#27614650)
The real workaround has always been to disable iptables and masq in the docker daemon and set up those things yourself, with your existing firewall. Binding your port to loopback works too, but that's more prone to accidents.
You can then expose ports to a specific IP and use UFW to allow it.
Much cleaner than any UFW-docker hacks out there, and more secure.
https://docs.docker.com/engine/security/rootless/