Reject connections to redirect listener
This commit is contained in:
parent
add23d4844
commit
80ea96e5b4
4 changed files with 104 additions and 7 deletions
|
|
@ -123,6 +123,17 @@ func (r *autoRedirect) setupNFTables() error {
|
|||
}
|
||||
}
|
||||
|
||||
if r.redirectServer != nil {
|
||||
chainInput := nft.AddChain(&nftables.Chain{
|
||||
Name: "input",
|
||||
Table: table,
|
||||
Hooknum: nftables.ChainHookInput,
|
||||
Priority: nftables.ChainPriorityFilter,
|
||||
Type: nftables.ChainTypeFilter,
|
||||
})
|
||||
r.nftablesCreateRedirectPortReject(nft, table, chainInput)
|
||||
}
|
||||
|
||||
chainPreRouting := nft.AddChain(&nftables.Chain{
|
||||
Name: "prerouting",
|
||||
Table: table,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue