diff --git a/redirect_nftables.go b/redirect_nftables.go index 4dea1c1..f7253cc 100644 --- a/redirect_nftables.go +++ b/redirect_nftables.go @@ -192,6 +192,25 @@ func (r *autoRedirect) setupNFTables() error { }, }, }) + nft.AddRule(&nftables.Rule{ + Table: table, + Chain: chainPreRoutingUDP, + Exprs: []expr.Any{ + &expr.Meta{ + Key: expr.MetaKeyIIFNAME, + Register: 1, + }, + &expr.Cmp{ + Op: expr.CmpOpEq, + Register: 1, + Data: nftablesIfname(r.tunOptions.Name), + }, + &expr.Counter{}, + &expr.Verdict{ + Kind: expr.VerdictReturn, + }, + }, + }) nft.AddRule(&nftables.Rule{ Table: table, Chain: chainPreRoutingUDP,