Systemd Service Hardening

https://roguesecurity.dev/blog/systemd-hardening

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!

30 points · 4 comments · view on lemmy.world

4 Comments

MysteriousSophon21@lemmy.world · 4 pts · 1y (1 reply)

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.

starkzarn@infosec.pub · 2 pts · 1y

Good callout! You're absolutely right, and here I was primarily focused on publicly accessible services. Thanks for the addition.

airgapped@piefed.social · 3 pts · 1y (1 reply)

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

starkzarn@infosec.pub · 2 pts · 1y

Very glad to gear it! Learning new stuff with Linux is the fun part of the journey.