File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,6 +79,39 @@ User = www-data
7979Restart = always
8080RestartSec = 60
8181
82+ # Optional security hardening
83+ CapabilityBoundingSet =
84+ DevicePolicy =closed
85+ LockPersonality =yes
86+ MemoryDenyWriteExecute =yes
87+ NoNewPrivileges =yes
88+ PrivateDevices =yes
89+ PrivateIPC =yes
90+ PrivateMounts =yes
91+ PrivateTmp =yes
92+ PrivateUsers =yes
93+ ProcSubset =pid
94+ ProtectClock =yes
95+ ProtectControlGroups =yes
96+ ProtectHome =read-only
97+ ProtectHostname =yes
98+ ProtectKernelLogs =yes
99+ ProtectKernelModules =yes
100+ ProtectKernelTunables =yes
101+ ProtectProc =invisible
102+ ProtectSystem =strict
103+ RemoveIPC =yes
104+ RestrictAddressFamilies =AF_INET AF_INET6 AF_UNIX
105+ RestrictNamespaces =yes
106+ RestrictRealtime =yes
107+ RestrictSUIDSGID =yes
108+ SecureBits =noroot-locked
109+ SystemCallArchitectures =native
110+ SystemCallFilter =@system-service
111+ SystemCallFilter =~@privileged
112+ SystemCallFilter =~@resources
113+ UMask =0077
114+
82115[Install]
83116WantedBy = multi-user.target
84117```
You can’t perform that action at this time.
0 commit comments