cross-posted from: https://infosec.pub/post/32937284

This one is a little self-hosting specific, and more casual Linux best practices, but I've got a new blog post down for general security! Harden your systemd units (especially custom ones) for better peace of mind on the internet!

all 4 comments

sorted by: hot top controversial new old
[–] 4 points 1 year ago (1 child)

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.

  • source
  • hideshow 1 child comment
  • [–] 3 points 1 year ago (1 child)

    I definitely learnt (more than) a few things from your write up, thank you sir!

  • source
  • hideshow 1 child comment
  • 6 comments in c/selfhosted@lemmy.world view that post
    [–] 19 points 1 year ago (1 child)
  • [–] 4 points 1 year ago (1 child)

    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?

  • source
  • hideshow 1 child comment
  • [–] [S] 1 point 1 year ago

    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.

  • source
  • parent
  • [–] 3 points 1 year ago (1 child)