masquerade only marked packets
This commit is contained in:
parent
5bc0c3b2b4
commit
dd8251468e
@ -90,7 +90,7 @@ func (r *IfaceToIPSet) PutIPTable(table string) error {
|
||||
return fmt.Errorf("failed to clear chain: %w", err)
|
||||
}
|
||||
|
||||
err = r.IPTables.AppendUnique("nat", postroutingChainName, "-o", r.IfaceName, "-j", "MASQUERADE")
|
||||
err = r.IPTables.AppendUnique("nat", postroutingChainName, "-m", "mark", "--mark", strconv.Itoa(int(r.mark)), "-j", "MASQUERADE")
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create rule: %w", err)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user