Adding PrivateNetwork=yes to your systemd units is a game changer for services that don't need network access - it completly isolates the service from the network and prevents any outbound connections.
post
I definitely learnt (more than) a few things from your write up, thank you sir!
Good write-up
How hard would it be to contribute these improvements back to the project in the form of either distro package updates or documentation changes? Did you consider that?
That's a super valid question, as it seems sometimes that some of these things are configured in a way that begs the question "why?" As far as contributing to documentation, that's a moot point. This is already in the man pages, and that's exactly what I referenced in writing this post, in addition to some empirical testing of course. As far as implementation goes, I think that probably lies at a per distribution level, where not one size fits all. Although I don't know of it off the top of my head, I'm sure there's a security centric distro out there that implements more of these sandboxing options by default.
That was very informative
all 4 comments