{"record":{"id":"bd0dd815085f2a6f","repo":"netbirdio/netbird","slug":"add-accept-rules-to-external-chains-w","errorCode":null,"errorMessage":"add accept rules to external chains: %w","messagePattern":"add accept rules to external chains: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/firewall/nftables/router_linux.go","lineNumber":1075,"sourceCode":"\n\t}\n\treturn nberrors.FormatErrorOrNil(merr)\n}\n\n// acceptForwardRules adds iif/oif rules in the filter table/forward chain to make sure\n// that our traffic is not dropped by existing rules there.\n// The existing FORWARD rules/policies decide outbound traffic towards our interface.\n// In case the FORWARD policy is set to \"drop\", we add an established/related rule to allow return traffic for the inbound rule.\n// This method also adds INPUT chain rules to allow traffic to the local interface.\nfunc (r *router) acceptForwardRules() error {\n\tvar merr *multierror.Error\n\n\tif err := r.acceptFilterTableRules(); err != nil {\n\t\tmerr = multierror.Append(merr, err)\n\t}\n\n\tif err := r.acceptExternalChainsRules(); err != nil {\n\t\tmerr = multierror.Append(merr, fmt.Errorf(\"add accept rules to external chains: %w\", err))\n\t}\n\n\treturn nberrors.FormatErrorOrNil(merr)\n}\n\nfunc (r *router) acceptFilterTableRules() error {\n\tif r.filterTable == nil {\n\t\treturn nil\n\t}\n\n\tfw := \"iptables\"\n\n\tdefer func() {\n\t\tlog.Debugf(\"Used %s to add accept forward and input rules\", fw)\n\t}()\n\n\t// Try iptables first and fallback to nftables if iptables is not available.\n\t// Use the correct protocol (iptables vs ip6tables) for the address family.","sourceCodeStart":1057,"sourceCodeEnd":1093,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/firewall/nftables/router_linux.go#L1057-L1093","documentation":"Error \"add accept rules to external chains: %w\" thrown in netbirdio/netbird.","triggerScenarios":"Thrown at client/firewall/nftables/router_linux.go:1075 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"}