zlacker

[return to "A story on home server security"]
1. smarx0+P4[view] [source] 2025-01-05 13:38:36
>>todsac+(OP)
Docker has a known security issue with port exposure in that it punches holes through the firewall without asking your permission, see https://github.com/moby/moby/issues/4737

I usually expose ports like `127.0.0.1:1234:1234` instead of `1234:1234`. As far as I understand, it still punches holes this way but to access the container, an attacker would need to get a packet routed to the host with a spoofed IP SRC set to `127.0.0.1`. All other solutions that are better seem to be much more involved.

◧◩
2. anthro+x6[view] [source] 2025-01-05 14:01:02
>>smarx0+P4
And this was one of the reason why I switched to Podman. I haven't looked back since.
◧◩◪
3. MortyW+xa[view] [source] 2025-01-05 14:39:59
>>anthro+x6
I want to use Podman but I keep reading the team feels podman-compose to be some crappy workaround they don’t really want to keep.

This is daunting because:

Take 50 random popular open source self-hostable solutions and the instructions are invariably: normal bare installation or docker compose.

So what’s the ideal setup when using podman? Use compose anyway and hope it won’t be deprecated, or use SystemD as Podman suggests as a replacement for Compose?

◧◩◪◨
4. diggan+kd[view] [source] 2025-01-05 15:05:20
>>MortyW+xa
> So what’s the ideal setup when using podman? Use compose anyway and hope it won’t be deprecated, or use SystemD as Podman suggests as a replacement for Compose?

After moving from bare to compose to docker-compose to podman-compose and bunch of things in-between (homegrown Clojure config-evaluators, ansible, terraform, make/just, a bunch more), I finally settled on using Nix for managing containers.

It's basically the same as docker-compose except you get to do it with proper code (although Nix :/ ) and as a extra benefit, get to avoid YAML.

You can switch the backend/use multiple ones as well, and relatively easy to configure as long as you can survive learning the basics of the language: https://wiki.nixos.org/wiki/Docker

◧◩◪◨⬒
5. 0xCMP+3i[view] [source] 2025-01-05 15:42:21
>>diggan+kd
Of course, that means you need to run NixOS for that to work (which I also do everywhere) and there are networking problems with Docker/Podman in NixOS you need to address yourself. Whereas Docker "runs anywhere" these days.

Worth noting the tradeoffs, but I agree using Nix for this makes life more pleasant and easy to maintain.

◧◩◪◨⬒⬓
6. libecl+Zr[view] [source] 2025-01-05 17:01:06
>>0xCMP+3i
You don't need NixOS to use Nix as a package manager/build system
◧◩◪◨⬒⬓⬔
7. brnt+Ct[view] [source] 2025-01-05 17:15:33
>>libecl+Zr
If you configure your server(s) through nix and nix containers, then even without another host OS you are basically running nix.
[go to top]