Skip tun interface traffic in prerouting UDP/ICMP chain
This commit is contained in:
parent
2377e62d4a
commit
381bf9d40d
1 changed files with 19 additions and 0 deletions
|
|
@ -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{
|
nft.AddRule(&nftables.Rule{
|
||||||
Table: table,
|
Table: table,
|
||||||
Chain: chainPreRoutingUDP,
|
Chain: chainPreRoutingUDP,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue