---
title: MasqExpression type | Wartiva GraphQL API
description: MasqExpression represents an nftables expression for masquerading, a form of Source NAT (SNAT). Wartiva GraphQL API reference with arguments, fields, and examples.
url: https://wartiva.com/api-docs/types/masq-expression.html
updated: 2026-10-07
---

Endpoint configuration · GraphQL type

# `MasqExpression` type

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!]`](https://wartiva.com/api-docs/types/nft-nat-flag.html) | Flags that modify the behavior of the masquerading operation, such as randomizing ports or ensuring persistence. |
| `regProtoMin` - [`NftRegister!`](https://wartiva.com/api-docs/types/nft-register.html) | The register holding the minimum protocol port for masquerading. |
| `regProtoMax` - [`NftRegister!`](https://wartiva.com/api-docs/types/nft-register.html) | The register holding the maximum protocol port for masquerading. If only one port is specified, this might be the same as 'regProtoMin'. |

## Used by

- [`ChainExpression`](https://wartiva.com/api-docs/types/chain-expression.html) union: A union of all possible nftables chain expression types.

## Example

### Example

```json
{"flags": ["PERSISTENT"], "regProtoMin": "VERDICT", "regProtoMax": "VERDICT"}

```

---

Wartiva is in early access. Request access: https://wartiva.com/early-access.html  
All pages: https://wartiva.com/llms.txt
