{"record":{"id":"3f7d9f48b7b7f5a7","repo":"netbirdio/netbird","slug":"create-default-allow-rules-w","errorCode":null,"errorMessage":"create default allow rules: %w","messagePattern":"create default allow rules: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/firewall/nftables/manager_linux.go","lineNumber":449,"sourceCode":"\treturn nberrors.FormatErrorOrNil(merr)\n}\n\n// AllowNetbird allows netbird interface traffic.\n// This is called when USPFilter wraps the native firewall, adding blanket accept\n// rules so that packet filtering is handled in userspace instead of by netfilter.\n//\n// TODO: In USP mode this only adds ACCEPT to the netbird table's own chains,\n// which doesn't override DROP rules in external tables (e.g. firewalld).\n// Should add passthrough rules to external chains (like the native mode router's\n// addExternalChainsRules does) for both the netbird table family and inet tables.\n// The netbird table itself is fine (routing chains already exist there), but\n// non-netbird tables with INPUT/FORWARD hooks can still DROP our WG traffic.\nfunc (m *Manager) AllowNetbird() error {\n\tm.mutex.Lock()\n\tdefer m.mutex.Unlock()\n\n\tif err := m.aclManager.createDefaultAllowRules(); err != nil {\n\t\treturn fmt.Errorf(\"create default allow rules: %w\", err)\n\t}\n\tif m.hasIPv6() {\n\t\tif err := m.aclManager6.createDefaultAllowRules(); err != nil {\n\t\t\treturn fmt.Errorf(\"create v6 default allow rules: %w\", err)\n\t\t}\n\t}\n\tif err := m.rConn.Flush(); err != nil {\n\t\treturn fmt.Errorf(\"flush allow input netbird rules: %w\", err)\n\t}\n\n\tif err := firewalld.TrustInterface(m.wgIface.Name()); err != nil {\n\t\tlog.Warnf(\"failed to trust interface in firewalld: %v\", err)\n\t}\n\n\treturn nil\n}\n\n// SetLegacyManagement sets the route manager to use legacy management","sourceCodeStart":431,"sourceCodeEnd":467,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/firewall/nftables/manager_linux.go#L431-L467","documentation":"Creating the default allow rules in the netbird nftables table failed while AllowNetbird was wrapping the native firewall for userspace filtering. It fires when the aclManager cannot insert the blanket accept rules, typically because the nftables work table is missing or the netlink transaction was rejected.","triggerScenarios":"Thrown at client/firewall/nftables/manager_linux.go:449 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the netbird nftables table and chains exist before calling AllowNetbird","Check nftables kernel module availability and permissions (agent must run as root)","Retry after recreating the firewall manager so the work table is rebuilt"],"exampleFix":null,"handlingStrategy":"retry","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"}