Skip to content
/ example_ynh Public template

Commit

Permalink
Merge pull request #180 from YunoHost/improve-systemd-security
Browse files Browse the repository at this point in the history
Improve systemd hardening
  • Loading branch information
alexAubin committed Nov 20, 2022
2 parents b419177 + 028e730 commit ac52667
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions conf/systemd.service
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,20 @@ StandardError=inherit
NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK
RestrictNamespaces=yes
RestrictRealtime=yes
DevicePolicy=closed
ProtectClock=yes
ProtectHostname=yes
ProtectProc=invisible
ProtectSystem=full
ProtectControlGroups=yes
ProtectKernelModules=yes
ProtectKernelTunables=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
# Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html
Expand Down

0 comments on commit ac52667

Please sign in to comment.