{"record":{"id":"5d665633ac20a41c","repo":"netbirdio/netbird","slug":"add-firewall-rule-w","errorCode":null,"errorMessage":"add firewall rule: %w","messagePattern":"add firewall rule: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/internal/acl/manager.go","lineNumber":363,"sourceCode":"\tcase *mgmProto.PortInfo_Range_:\n\t\tr := portInfo.GetRange()\n\t\treturn r == nil || r.Start == 0 || r.End == 0\n\tdefault:\n\t\treturn true\n\t}\n}\n\nfunc (d *DefaultManager) addInRules(\n\tid []byte,\n\tip netip.Addr,\n\tprotocol firewall.Protocol,\n\tport *firewall.Port,\n\taction firewall.Action,\n\tipsetName string,\n) ([]firewall.Rule, error) {\n\trule, err := d.firewall.AddPeerFiltering(id, ip.AsSlice(), protocol, nil, port, action, ipsetName)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"add firewall rule: %w\", err)\n\t}\n\n\treturn rule, nil\n}\n\nfunc (d *DefaultManager) addOutRules(\n\tid []byte,\n\tip netip.Addr,\n\tprotocol firewall.Protocol,\n\tport *firewall.Port,\n\taction firewall.Action,\n\tipsetName string,\n) ([]firewall.Rule, error) {\n\tif shouldSkipInvertedRule(protocol, port) {\n\t\treturn nil, nil\n\t}\n\n\trule, err := d.firewall.AddPeerFiltering(id, ip.AsSlice(), protocol, port, nil, action, ipsetName)","sourceCodeStart":345,"sourceCodeEnd":381,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/internal/acl/manager.go#L345-L381","documentation":"The firewall backend rejected AddPeerFiltering while addInRules was installing an inbound peer filtering rule (address, protocol, port, action, ipset). The ACL manager aborts the rule conversion for this entry with the backend's cause attached, leaving the rule uninstalled rather than half-applied.","triggerScenarios":"Thrown at client/internal/acl/manager.go:363 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check firewall engine health and retry the ACL apply","Verify ipset capacity if the rule uses a set","Look at the wrapped error for the backend-specific cause"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c","analyzedAt":"2026-08-16T03:09:19.136Z","contentChangedAt":"2026-08-16T03:09:19.136Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}