User:Rdeckard/Secure Systemd
Appearance
Discussion is here: Talk:Security#Using systemd for more secure services
Consider adding the following options in user-created or system systemd units.
File systems
ProtectHome=truetruemakes/home,/root, and/run/userin accessible and empty for processes invoked by this unit.read-onlymakes these three directories read-only.
ProtectSystem=stricttruemounts/usrand/bootas read-only for processes invoked by this unit.fullmounts/etcas read-only, too.strictmounts the entire file system hierarchy as read-only except for the API file system subtrees/dev,/proc, and/sys.
PrivateDevices=trueProtectKernelTunables=trueProtectControlGroups=truePrivateTmp=true
Kernel
ProtectKernelModules=true
Network
PrivateNetwork=trueRestrictAddressFamilies
Other
MemoryDenyWriteExecute=trueRestrictRealtime=true
Restricting root
PrivateUsers=true