1
0
forked from colin/nix-files

clightning: harden

This commit is contained in:
Colin 2024-01-04 18:47:40 +00:00
parent 4ce93f74c6
commit cecb114810

View File

@ -154,7 +154,33 @@ in
User = cfg.user;
Restart = "on-failure";
RestartSec = "30s";
ReadWritePaths = [ cfg.dataDir ];
# hardening
LockPersonality = true;
MemoryDenyWriteExecute = true;
NoNewPrivileges = true;
PrivateDevices = true;
PrivateMounts = true;
PrivateTmp = true;
PrivateUsers = true;
ProcSubset = "pid";
ProtectClock = true;
ProtectControlGroups = true;
ProtectHome = true;
ProtectHostname = true;
ProtectKernelLogs = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
ProtectProc = "invisible";
ProtectSystem = "strict";
RemoveIPC = true;
RestrictAddressFamilies = "AF_UNIX AF_INET AF_INET6";
RestrictNamespaces = true;
RestrictSUIDSGID = true;
SystemCallArchitectures = "native";
SystemCallFilter = [ "@system-service" "~@privileged" "~@resources" ];
};
preStart = ''