Merge pull request #180 from YunoHost/improve-systemd-security
Improve systemd hardening
This commit is contained in:
commit
ac52667ca0
1 changed files with 6 additions and 2 deletions
|
@ -18,16 +18,20 @@ StandardError=inherit
|
||||||
NoNewPrivileges=yes
|
NoNewPrivileges=yes
|
||||||
PrivateTmp=yes
|
PrivateTmp=yes
|
||||||
PrivateDevices=yes
|
PrivateDevices=yes
|
||||||
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
|
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK
|
||||||
RestrictNamespaces=yes
|
RestrictNamespaces=yes
|
||||||
RestrictRealtime=yes
|
RestrictRealtime=yes
|
||||||
DevicePolicy=closed
|
DevicePolicy=closed
|
||||||
|
ProtectClock=yes
|
||||||
|
ProtectHostname=yes
|
||||||
|
ProtectProc=invisible
|
||||||
ProtectSystem=full
|
ProtectSystem=full
|
||||||
ProtectControlGroups=yes
|
ProtectControlGroups=yes
|
||||||
ProtectKernelModules=yes
|
ProtectKernelModules=yes
|
||||||
ProtectKernelTunables=yes
|
ProtectKernelTunables=yes
|
||||||
LockPersonality=yes
|
LockPersonality=yes
|
||||||
SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap
|
SystemCallArchitectures=native
|
||||||
|
SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap @cpu-emulation @privileged
|
||||||
|
|
||||||
# Denying access to capabilities that should not be relevant for webapps
|
# Denying access to capabilities that should not be relevant for webapps
|
||||||
# Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html
|
# Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html
|
||||||
|
|
Loading…
Reference in a new issue