Skip to content

πŸ”‘ darkone.security.complement

Cross-cutting complementary measures β€” Annex A (C1–C12). (wip)

These measures have no ANSSI number but are essential to the guide’s spirit. Covers linux-hardened patches (C1), Lockdown LSM (C2), USBGuard (C3), nftables deny-by-default (C4), hardened SSH (C5), LUKS2 (C6), NTP/NTS (C7), secure DNS (C8), disabled core dumps (C9), PAM anti brute-force (C10), legal banners (C11), and cron/at restriction (C12).

  • enable bool Enable complementary ANSSI measures (C1–C12).
  • lockdownLevel enum [ "none" "integrity" "confidentiality" ] Lockdown LSM level (C2)
  • lsmStack listOf str LSM stack order (C2, R11, R20). Modifies boot.kernelParams lsm=…
  • ntpServers listOf str NTP/NTS servers (C7).
  • useNts bool Enable NTS (Network Time Security) for NTP authentication (C7).
  • sshBanner str SSH banner displayed before authentication (C11).
  • cronAllowedUsers listOf str Users allowed to schedule cron jobs (C12).
  • atAllowedUsers listOf str Users allowed to schedule at jobs (C12). Mirrors cronAllowedUsers by default.
  • egressAllowlist listOf str IPv4/IPv6 addresses or CIDRs allowed outbound under the C4 reinforced egress deny-by-default policy. Empty list keeps the policy but only loopback and established/related traffic pass (proxy required).
darkone.security.complement = {
enable = false;
lockdownLevel = "integrity";
lsmStack = [ ];
ntpServers = [ ];
useNts = true;
sshBanner = ''
╔═════════════════════════════════════════════════════════╗
β•‘ DNF NETWORK NODE β•‘
β•‘ Restricted and monitored access. β•‘
β•‘ Unauthorized access may result in criminal prosecution β•‘
β•‘ under Articles 323-1 to 323-8 of the French Penal Code. β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
'';
cronAllowedUsers = [ ];
atAllowedUsers = [ ];
egressAllowlist = [ ];
};

Source: modules/security/complement.nixΒ πŸ‘•