---
title: NatExpression type | Wartiva GraphQL API
description: NatExpression represents an nftables expression for performing Network Address Translation (NAT). Wartiva GraphQL API reference with arguments, fields, and examples.
url: https://wartiva.com/api-docs/types/nat-expression.html
updated: 2026-10-07
---

Endpoint configuration · GraphQL type

# `NatExpression` type

NatExpression represents an nftables expression for performing Network Address Translation (NAT). It allows modifying source or destination IP addresses and ports.

## Fields

| Field Name | Description |
|---|---|
| `type` - [`NATType!`](https://wartiva.com/api-docs/types/nat-type.html) | The type of NAT operation to perform. |
| `family` - [`NatFamily!`](https://wartiva.com/api-docs/types/nat-family.html) | The network protocol family the NAT operation applies to. |
| `regAddrMin` - [`NftRegister!`](https://wartiva.com/api-docs/types/nft-register.html) | The register holding the minimum IP address for the NAT translation range. |
| `regAddrMax` - [`NftRegister!`](https://wartiva.com/api-docs/types/nft-register.html) | The register holding the maximum IP address for the NAT translation range. If only one address is specified, regAddrMax might be the same as regAddrMin or not used. |
| `regProtoMin` - [`NftRegister!`](https://wartiva.com/api-docs/types/nft-register.html) | The register holding the minimum protocol port for the NAT translation range. |
| `regProtoMax` - [`NftRegister!`](https://wartiva.com/api-docs/types/nft-register.html) | The register holding the maximum protocol port for the NAT translation range. If only one port is specified, regProtoMax might be the same as regProtoMin or not used. |
| `flags` - [`[NftNatFlag!]`](https://wartiva.com/api-docs/types/nft-nat-flag.html) | Nat Flags |

## 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
{
  "type": "DNAT",
  "family": "UNSPECIFIED",
  "regAddrMin": "VERDICT",
  "regAddrMax": "VERDICT",
  "regProtoMin": "VERDICT",
  "regProtoMax": "VERDICT",
  "flags": ["PERSISTENT"]
}

```

---

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