netbirdio/netbird · error
remove output jump rule
Error message
remove output jump rule: %w
What it means
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.
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)
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at client/firewall/iptables/manager_linux.go:634 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of netbirdio/netbird@93e97f4bf1 (2026-08-16).
Data as JSON: /api/errors/fb06d79f01f91ce5.
Report an issue: GitHub.
Appendix: source
Thrown at client/firewall/iptables/manager_linux.go:634
return nil
}
func (m *Manager) cleanupNoTrackChain() error {
exists, err := m.ipv4Client.ChainExists(tableRaw, chainNameRaw)
if err != nil {
if !m.rawSupported {
return nil
}
return fmt.Errorf("check chain exists: %w", err)
}
if !exists {
return nil
}
jumpRule := []string{"-j", chainNameRaw}
if err := m.ipv4Client.DeleteIfExists(tableRaw, chainOUTPUT, jumpRule...); err != nil {
return fmt.Errorf("remove output jump rule: %w", err)
}
if err := m.ipv4Client.DeleteIfExists(tableRaw, chainPREROUTING, jumpRule...); err != nil {
return fmt.Errorf("remove prerouting jump rule: %w", err)
}
if err := m.ipv4Client.ClearAndDeleteChain(tableRaw, chainNameRaw); err != nil {
return fmt.Errorf("clear and delete chain: %w", err)
}
m.rawSupported = false
return nil
}
func getConntrackEstablished() []string {
return []string{"-m", "conntrack", "--ctstate", "RELATED,ESTABLISHED", "-j", "ACCEPT"}
}
View on GitHub (pinned to 93e97f4bf1)