{"record":{"id":"d314a636e88f6f06","repo":"netbirdio/netbird","slug":"add-prerouting-proxy-notrack-rule-w","errorCode":null,"errorMessage":"add prerouting proxy notrack rule: %w","messagePattern":"add prerouting proxy notrack rule: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/firewall/iptables/manager_linux.go","lineNumber":580,"sourceCode":"\toutputRuleSport := []string{\"-o\", \"lo\", \"-s\", \"127.0.0.1\", \"-d\", \"127.0.0.1\", \"-p\", \"udp\", \"--sport\", wgPortStr, \"-j\", \"NOTRACK\"}\n\tif err := m.ipv4Client.AppendUnique(tableRaw, chainNameRaw, outputRuleSport...); err != nil {\n\t\treturn fmt.Errorf(\"add output sport notrack rule: %w\", err)\n\t}\n\n\toutputRuleDport := []string{\"-o\", \"lo\", \"-s\", \"127.0.0.1\", \"-d\", \"127.0.0.1\", \"-p\", \"udp\", \"--dport\", wgPortStr, \"-j\", \"NOTRACK\"}\n\tif err := m.ipv4Client.AppendUnique(tableRaw, chainNameRaw, outputRuleDport...); err != nil {\n\t\treturn fmt.Errorf(\"add output dport notrack rule: %w\", err)\n\t}\n\n\t// Ingress rules: match incoming loopback UDP packets\n\tpreroutingRuleWg := []string{\"-i\", \"lo\", \"-s\", \"127.0.0.1\", \"-d\", \"127.0.0.1\", \"-p\", \"udp\", \"--dport\", wgPortStr, \"-j\", \"NOTRACK\"}\n\tif err := m.ipv4Client.AppendUnique(tableRaw, chainNameRaw, preroutingRuleWg...); err != nil {\n\t\treturn fmt.Errorf(\"add prerouting wg notrack rule: %w\", err)\n\t}\n\n\tpreroutingRuleProxy := []string{\"-i\", \"lo\", \"-s\", \"127.0.0.1\", \"-d\", \"127.0.0.1\", \"-p\", \"udp\", \"--dport\", proxyPortStr, \"-j\", \"NOTRACK\"}\n\tif err := m.ipv4Client.AppendUnique(tableRaw, chainNameRaw, preroutingRuleProxy...); err != nil {\n\t\treturn fmt.Errorf(\"add prerouting proxy notrack rule: %w\", err)\n\t}\n\n\tlog.Debugf(\"set up ebpf proxy notrack rules for ports %d,%d\", proxyPort, wgPort)\n\treturn nil\n}\n\nfunc (m *Manager) initNoTrackChain() error {\n\tif err := m.cleanupNoTrackChain(); err != nil {\n\t\tlog.Debugf(\"cleanup notrack chain: %v\", err)\n\t}\n\n\tif err := m.ipv4Client.NewChain(tableRaw, chainNameRaw); err != nil {\n\t\treturn fmt.Errorf(\"create chain: %w\", err)\n\t}\n\n\tjumpRule := []string{\"-j\", chainNameRaw}\n\n\tif err := m.ipv4Client.InsertUnique(tableRaw, chainOUTPUT, 1, jumpRule...); err != nil {","sourceCodeStart":562,"sourceCodeEnd":598,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/firewall/iptables/manager_linux.go#L562-L598","documentation":"Error \"add prerouting proxy notrack rule: %w\" thrown in netbirdio/netbird.","triggerScenarios":"Thrown at client/firewall/iptables/manager_linux.go:580 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c","analyzedAt":"2026-08-16T03:09:19.136Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}