ProtectSystem=strict
ProtectHome=yes
PrivateDevices=yes
ProtectKernelTunables=yes
ProtectKernelModules=yes
ProtectControlGroups=yes
SystemCallFilter=@system-service
SystemCallErrorNumber=EPERM
NoNewPrivileges=yes
PrivateTmp=yes
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
MemoryDenyWriteExecute=yes
LockPersonality=yes
Option to allow read/write access to specific paths
ReadWritePaths=
Specify multiple ReadWritePaths=
for multiple paths, or specify multiple paths in one ReadWritePaths=
, separated by space, optionally quoted in double quotes.
ProtectSystem=full
ProtectHome=yes
PrivateDevices=yes
NoNewPrivileges=yes
PrivateTmp=yes
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK
Option to allow read/write access to specific paths
ReadWriteDirectories=
Ref: https://gist.github.com/ageis/f5595e59b1cddb1513d1b425a323db04
Ref: https://www.redhat.com/sysadmin/mastering-systemd
Ref: https://www.redhat.com/sysadmin/systemd-secure-services