{"record":{"id":"35ea0d1bf2cbdeb4","repo":"netbirdio/netbird","slug":"init-ipv6-firewall-required-because-peer-has-ipv6","errorCode":null,"errorMessage":"init IPv6 firewall (required because peer has IPv6 address): %w","messagePattern":"init IPv6 firewall \\(required because peer has IPv6 address\\): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/firewall/nftables/manager_linux.go","lineNumber":201,"sourceCode":"\n\tdefer func() {\n\t\tif err != nil {\n\t\t\tm.rollbackInit()\n\t\t}\n\t}()\n\n\tif err := m.router.init(workTable); err != nil {\n\t\treturn fmt.Errorf(\"router init: %w\", err)\n\t}\n\n\tif err := m.aclManager.init(workTable); err != nil {\n\t\treturn fmt.Errorf(\"acl manager init: %w\", err)\n\t}\n\n\tif m.hasIPv6() {\n\t\tif err := m.initIPv6(); err != nil {\n\t\t\t// Peer has a v6 address: v6 firewall MUST work or we risk fail-open.\n\t\t\treturn fmt.Errorf(\"init IPv6 firewall (required because peer has IPv6 address): %w\", err)\n\t\t}\n\t}\n\n\tif err := m.initNoTrackChains(workTable); err != nil {\n\t\tlog.Warnf(\"raw priority chains not available, notrack rules will be disabled: %v\", err)\n\t}\n\n\treturn nil\n}\n\n// persistState saves the current interface state for potential recreation on restart.\n// Unlike iptables, which requires tracking individual rules, nftables maintains\n// a known state (our netbird table plus a few static rules). This allows for easy\n// cleanup using Close() without needing to store specific rules.\nfunc (m *Manager) persistState(stateManager *statemanager.Manager) {\n\tstateManager.RegisterState(&ShutdownState{})\n\n\tif err := stateManager.UpdateState(&ShutdownState{","sourceCodeStart":183,"sourceCodeEnd":219,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/firewall/nftables/manager_linux.go#L183-L219","documentation":"initIPv6 failed while the peer has an IPv6 address. Deliberately fail-closed: without v6 firewall rules the peer would send v6 traffic that bypasses ACLs, so Init aborts (after rollback) instead of continuing with v4 only.","triggerScenarios":"Thrown at client/firewall/nftables/manager_linux.go:201 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the inner error for the failing v6 step","Verify kernel nftables/ip6tables v6 support","If v6 is not needed, disable IPv6 on the network so only v4 initialization is required"],"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"}