mirror of
https://github.com/ArcticFoxes-net/Synapse-Ubuntu-ZFS
synced 2024-12-21 23:31:34 -05:00
NGINX hardening
Signed-off-by: Tommy <contact@tommytran.io>
This commit is contained in:
parent
b1658d3bad
commit
44671939c2
27
etc/systemd/system/nginx.service.d/override.conf
Normal file
27
etc/systemd/system/nginx.service.d/override.conf
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
[Service]
|
||||||
|
CapabilityBoundingSet=CAP_CHOWN CAP_DAC_OVERRIDE CAP_NET_BIND_SERVICE CAP_SETUID CAP_SETGID
|
||||||
|
LockPersonality=true
|
||||||
|
NoNewPrivileges=true
|
||||||
|
MemoryDenyWriteExecute=true
|
||||||
|
PrivateIPC=true
|
||||||
|
PrivateTmp=true
|
||||||
|
ProcSubset=pid
|
||||||
|
ProtectClock=true
|
||||||
|
ProtectControlGroups=true
|
||||||
|
ProtectHome=true
|
||||||
|
ProtectHostname=true
|
||||||
|
ProtectKernelLogs=true
|
||||||
|
ProtectKernelModules=true
|
||||||
|
ProtectKernelTunables=true
|
||||||
|
ProtectProc=invisible
|
||||||
|
ProtectSystem=strict
|
||||||
|
ReadWritePaths=/var/log/nginx /var/cache/nginx
|
||||||
|
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
|
||||||
|
RestrictNamespaces=true
|
||||||
|
RestrictRealtime=true
|
||||||
|
RestrictSUIDSGID=true
|
||||||
|
RuntimeDirectory=nginx
|
||||||
|
RuntimeDirectoryMode=700
|
||||||
|
SystemCallArchitectures=native
|
||||||
|
SystemCallFilter=@system-service
|
||||||
|
SystemCallFilter=~@obsolete
|
Loading…
Reference in New Issue
Block a user