MasqExpression represents an nftables expression for masquerading, a form of Source NAT (SNAT). It dynamically changes the source IP address and port of outgoing packets to that of the outbound interface, making it suitable for internet sharing where the external IP address is dynamic.
Fields
| Field Name | Description |
|---|---|
flags - [NftNatFlag!]
|
Flags that modify the behavior of the masquerading operation, such as randomizing ports or ensuring persistence. |
regProtoMin - NftRegister!
|
The register holding the minimum protocol port for masquerading. |
regProtoMax - NftRegister!
|
The register holding the maximum protocol port for masquerading. If only one port is specified, this might be the same as 'regProtoMin'. |
Used by
ChainExpressionunion: A union of all possible nftables chain expression types.
Example
Example
{"flags": ["PERSISTENT"], "regProtoMin": "VERDICT", "regProtoMax": "VERDICT"}