{"record":{"id":"db017b39a8a8529f","repo":"jdx/mise","slug":"bootstrap-firewall-management-is-only-supported-on","errorCode":null,"errorMessage":"bootstrap firewall management is only supported on Linux","messagePattern":"bootstrap firewall management is only supported on Linux","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/firewall_non_linux.rs","lineNumber":48,"sourceCode":"}\n\npub fn inspect_request(_request: &mut FirewallRequest) -> Result<()> {\n    Ok(())\n}\n\nimpl FirewallRequest {\n    pub fn plans(&self) -> Vec<ResourcePlan> {\n        vec![ResourcePlan::new(\n            ResourceId::new(\"firewall\", \"linux\"),\n            \"unsupported platform\",\n            \"configured Linux firewall\",\n            ResourceAction::Unknown,\n        )]\n    }\n}\n\npub fn apply(_request: &FirewallRequest, _dry_run: bool, _yes: bool) -> Result<()> {\n    bail!(\"bootstrap firewall management is only supported on Linux\")\n}\n\npub fn inspect_privileged_plan_from_stdin() -> Result<()> {\n    bail!(\"bootstrap firewall management is only supported on Linux\")\n}\n\npub fn apply_privileged_plan_from_stdin() -> Result<()> {\n    bail!(\"bootstrap firewall management is only supported on Linux\")\n}\n\nfn configured(config: &Config) -> bool {\n    config.config_files.values().any(|cf| {\n        cf.bootstrap_config()\n            .and_then(|bootstrap| bootstrap.linux.firewall)\n            .is_some_and(|firewall| {\n                let _ = firewall.values.len();\n                true\n            })","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/jdx/mise/blob/9dcfcaa0dc8747a2577d3270b69bb9d8313b2807/src/system/firewall_non_linux.rs#L30-L66","documentation":"On macOS and Windows, mise compiles firewall_non_linux.rs as the firewall implementation; its apply() unconditionally bails because bootstrap firewall management (iptables/nftables) is Linux-only. Any code path that reaches firewall::apply on a non-Linux host gets this error instead of attempting firewall changes.","triggerScenarios":"The firewall apply step (from `mise bootstrap` or the system/firewall CLI surface) executes on macOS or Windows, regardless of whether a firewall request was built.","commonSituations":"A dotfiles/team mise.toml containing [bootstrap.linux.firewall] gets run on a Mac; CI matrix jobs that run identical bootstrap scripts on multiple operating systems; orchestration that calls the firewall step unconditionally across a mixed fleet.","solutions":["Run the firewall bootstrap step only on Linux hosts","Move [bootstrap.linux.firewall] into a Linux-only config file or template it per-OS so macOS/Windows never load it","Skip the firewall step on non-Linux in automation scripts"],"exampleFix":"# before: shared mise.toml on every machine\n[bootstrap.linux.firewall]\nrules = { allow_ssh_22 = { port = 22 } }\n\n# after: keep that section only in the config file used on Linux hosts,\n# and remove it from the macOS/Windows config","handlingStrategy":"validation","validationCode":"# gate the firewall step by OS in scripts\nif [ \"$(uname -s)\" = Linux ]; then\n  mise bootstrap   # includes firewall step\nelse\n  mise bootstrap --skip system/firewall 2>/dev/null || mise bootstrap\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep [bootstrap.linux.firewall] only in config files loaded on Linux hosts","Check the OS before invoking firewall-related steps in shared automation","Test shared bootstrap configs on every OS in your CI matrix"],"tags":["mise","firewall","platform-support","linux","bootstrap"],"backgroundTag":"platform-not-supported","analyzedSha":"9dcfcaa0dc8747a2577d3270b69bb9d8313b2807","analyzedAt":"2026-08-17T14:28:50.624Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}