{"record":{"id":"a2291af4e5108a7b","repo":"netbirdio/netbird","slug":"remove-prerouting-jump-rule-w","errorCode":null,"errorMessage":"remove prerouting jump rule: %w","messagePattern":"remove prerouting jump rule: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/firewall/iptables/manager_linux.go","lineNumber":638,"sourceCode":"\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":620,"sourceCodeEnd":652,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/firewall/iptables/manager_linux.go#L620-L652","documentation":"During cleanupNoTrackChain teardown, deleting the PREROUTING jump rule into the NetBird raw chain failed. With this jump still present, inbound loopback packets remain diverted to the NetBird chain even after the manager exits, so cleanup aborts with this error instead of deleting a chain that is still referenced.","triggerScenarios":"Thrown at client/firewall/iptables/manager_linux.go:638 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove manually with 'iptables -t raw -D PREROUTING -j <chain>'","Restart-stop cycle the daemon to retry cleanup","Fix underlying iptables availability issues"],"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"}