Firewall (sec-firewall)

Checks firewall status, detects rule changes compared to a baseline, and monitors blocked connection attempts.

Configuration

ParameterTypeDefaultDescription
enabledbooltrueEnable/disable module
firewall_typestring/nullnullForce firewall type (nftables, iptables, firewalld) or auto-detect
inactive_firewall_severityint2Severity when firewall is inactive
baseline_pathstring""Path to ruleset baseline (empty = platform-specific default)
blocked_connections_window_minutesint60Time window for blocked connection counting
blocked_connections_thresholdint100Threshold for blocked connections
ignore_patternslist["DOCKER", "docker0", "br-"]Ignore firewall rules matching these patterns

YAML Example

sec_firewall:
  enabled: true
  inactive_firewall_severity: 2
  blocked_connections_threshold: 50
  ignore_patterns:
    - "DOCKER"
    - "docker0"

Diagnostic Codes

CodeSeverityMeaningRecommendation
50000Firewall active, rules match baseline
50011–2Many blocked connectionsInvestigate source, possible scan/attack
50032Firewall not active or profile disabledEnable firewall
50901Firewall tool not availableInstall a firewall (nftables, ufw, etc.)
60031Firewall rules have changed since baselineReview changes, update baseline if appropriate

Platform Support

  • Linux: Supports nftables, iptables, and firewalld. Automatic detection.
  • Windows: Checks Windows Firewall profiles (Domain, Private, Public).