{"record":{"id":"fb06d79f01f91ce5","repo":"netbirdio/netbird","slug":"remove-output-jump-rule-w","errorCode":null,"errorMessage":"remove output jump rule: %w","messagePattern":"remove output jump rule: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/firewall/iptables/manager_linux.go","lineNumber":634,"sourceCode":"\treturn nil\n}\n\nfunc (m *Manager) cleanupNoTrackChain() error {\n\texists, err := m.ipv4Client.ChainExists(tableRaw, chainNameRaw)\n\tif err != nil {\n\t\tif !m.rawSupported {\n\t\t\treturn nil\n\t\t}\n\t\treturn fmt.Errorf(\"check chain exists: %w\", err)\n\t}\n\tif !exists {\n\t\treturn nil\n\t}\n\n\tjumpRule := []string{\"-j\", chainNameRaw}\n\n\tif err := m.ipv4Client.DeleteIfExists(tableRaw, chainOUTPUT, jumpRule...); err != nil {\n\t\treturn fmt.Errorf(\"remove output jump rule: %w\", err)\n\t}\n\n\tif err := m.ipv4Client.DeleteIfExists(tableRaw, chainPREROUTING, jumpRule...); err != nil {\n\t\treturn fmt.Errorf(\"remove prerouting jump rule: %w\", err)\n\t}\n\n\tif err := m.ipv4Client.ClearAndDeleteChain(tableRaw, chainNameRaw); err != nil {\n\t\treturn fmt.Errorf(\"clear and delete chain: %w\", err)\n\t}\n\n\tm.rawSupported = false\n\treturn nil\n}\n\nfunc getConntrackEstablished() []string {\n\treturn []string{\"-m\", \"conntrack\", \"--ctstate\", \"RELATED,ESTABLISHED\", \"-j\", \"ACCEPT\"}\n}\n","sourceCodeStart":616,"sourceCodeEnd":652,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/firewall/iptables/manager_linux.go#L616-L652","documentation":"During cleanupNoTrackChain teardown, deleting the jump rule that routes OUTPUT traffic into the NetBird raw chain failed. The chain itself cannot be removed while this jump exists, so the error prevents full removal of the NOTRACK configuration and leftover rules would keep matching loopback traffic after the firewall manager closed.","triggerScenarios":"Thrown at client/firewall/iptables/manager_linux.go:634 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Manually remove the jump rule: 'iptables -t raw -D OUTPUT -j <chain>'","Re-run the daemon stop/start cycle so cleanup retries","Investigate why iptables deletes fail (locks, capabilities)"],"exampleFix":null,"handlingStrategy":"fallback","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"}