{"record":{"id":"bb6d3befb43c3f0e","repo":"netbirdio/netbird","slug":"remove-output-dnat-w","errorCode":null,"errorMessage":"remove output DNAT: %w","messagePattern":"remove output DNAT: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/firewall/iptables/manager_linux.go","lineNumber":514,"sourceCode":"\tdefer m.mutex.Unlock()\n\n\tif localAddr.Is6() {\n\t\tif !m.hasIPv6() {\n\t\t\treturn fmt.Errorf(\"add output DNAT: %w\", firewall.ErrIPv6NotInitialized)\n\t\t}\n\t\treturn m.router6.AddOutputDNAT(localAddr, protocol, originalPort, translatedPort)\n\t}\n\treturn m.router.AddOutputDNAT(localAddr, protocol, originalPort, translatedPort)\n}\n\n// RemoveOutputDNAT removes an OUTPUT chain DNAT rule.\nfunc (m *Manager) RemoveOutputDNAT(localAddr netip.Addr, protocol firewall.Protocol, originalPort, translatedPort uint16) error {\n\tm.mutex.Lock()\n\tdefer m.mutex.Unlock()\n\n\tif localAddr.Is6() {\n\t\tif !m.hasIPv6() {\n\t\t\treturn fmt.Errorf(\"remove output DNAT: %w\", firewall.ErrIPv6NotInitialized)\n\t\t}\n\t\treturn m.router6.RemoveOutputDNAT(localAddr, protocol, originalPort, translatedPort)\n\t}\n\treturn m.router.RemoveOutputDNAT(localAddr, protocol, originalPort, translatedPort)\n}\n\nconst (\n\tchainNameRaw = \"NETBIRD-RAW\"\n\tchainOUTPUT  = \"OUTPUT\"\n\ttableRaw     = \"raw\"\n)\n\n// SetupEBPFProxyNoTrack creates notrack rules for eBPF proxy loopback traffic.\n// This prevents conntrack from tracking WireGuard proxy traffic on loopback, which\n// can interfere with MASQUERADE rules (e.g., from container runtimes like Podman/netavark).\n//\n// Traffic flows that need NOTRACK:\n//","sourceCodeStart":496,"sourceCodeEnd":532,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/firewall/iptables/manager_linux.go#L496-L532","documentation":"Error \"remove output DNAT: %w\" thrown in netbirdio/netbird.","triggerScenarios":"Thrown at client/firewall/iptables/manager_linux.go:514 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"}