Merge pull request #285833 from 360ied/murmur-hardened
nixos/murmur: systemd service hardening
This commit is contained in:
commit
5de4385620
1 changed files with 23 additions and 0 deletions
|
@ -326,6 +326,29 @@ in
|
|||
RuntimeDirectoryMode = "0700";
|
||||
User = "murmur";
|
||||
Group = "murmur";
|
||||
|
||||
# service hardening
|
||||
AmbientCapabilities = "CAP_NET_BIND_SERVICE";
|
||||
CapabilityBoundingSet = "CAP_NET_BIND_SERVICE";
|
||||
LockPersonality = true;
|
||||
MemoryDenyWriteExecute = true;
|
||||
NoNewPrivileges = true;
|
||||
PrivateDevices = true;
|
||||
PrivateTmp = true;
|
||||
ProtectClock = true;
|
||||
ProtectControlGroups = true;
|
||||
ProtectHome = true;
|
||||
ProtectHostname = true;
|
||||
ProtectKernelLogs = true;
|
||||
ProtectKernelModules = true;
|
||||
ProtectKernelTunables = true;
|
||||
ProtectSystem = "full";
|
||||
RestrictAddressFamilies = "~AF_PACKET AF_NETLINK";
|
||||
RestrictNamespaces = true;
|
||||
RestrictSUIDSGID = true;
|
||||
RestrictRealtime = true;
|
||||
SystemCallArchitectures = "native";
|
||||
SystemCallFilter = "@system-service";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue