Skip to content

๐Ÿ”‘ darkone.security.network

Network services โ€” isolation and supervision (R78โ€“R80). (wip)

Covers isolation of network services (R78: server category), hardening and monitoring of exposed services (R79: fail2ban, HTTP headers, ANSSI TLS) and reduction of the network surface (R80).

  • enable bool Enable ANSSI network hardening (R78โ€“R80).
  • exposedServices listOf str Public services to jail with fail2ban (R79). Each entry MUST resolve to a filter โ€” one shipped by fail2ban, or one declared in filters โ€” or the assertion refuses the build.
  • filters attrs Filters usable in exposedServices, on top of those fail2ban ships. Caddy, Synapse and Kanidm need theirs written against real journal output โ€” declare them here once the patterns are confirmed.
    • journalmatch str Journal match for the jail (fail2ban runs on the systemd backend).
    • failregex str Failure pattern, written to filter.d/<name>.conf. Empty when fail2ban already ships the filter and only the match is missing.
  • publicListeners listOf str Services allowed to listen on 0.0.0.0 / :: (R80).
  • httpsHeaders bool Adds ANSSI HTTP security headers in Nginx/Caddy (R79).
  • tlsCiphers listOf str ANSSI TLS cipher suite for Nginx (R79).
darkone.security.network = {
enable = false;
exposedServices = [ ];
filters.journalmatch = "_SYSTEMD_UNIT=forgejo.service";
filters.failregex = "";
publicListeners = [ ];
httpsHeaders = true;
tlsCiphers = [ ];
};

Source: modules/security/network.nixย ๐Ÿก•