> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/welcome/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/welcome/elastic-compute/networking/01-overview-3/07-configuration-guide.md).

# NAT Gateway Configuration Guide

## Setup Flow

![Setup flow — from zero to a working NAT Gateway](/files/YUoeb6oRa5VJdlWVAhOA)

Steps **1–3** are required. **4a** and **4b** are independent — add either or both. **5** is verification.

| #  | Task                         | Console path                                                                                                                | What you'll set                                                                                            |
| -- | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| 1  | Allocate Elastic IPs         | [Elastic Compute → Elastic IPv4 → Allocate EIP](https://console.zenlayer.com/zec/elastic-ip)                                | Same region as the gateway                                                                                 |
| 2  | Create Public NAT Gateway    | [Public NAT Gateway → Create Public NAT Gateway](https://console.zenlayer.com/zec/nat-gateway/create)                       | Global VPC · subnets to route through the gateway                                                          |
| 3  | Bind an EIPv4 to the gateway | Open [Public NAT Gateway](https://console.zenlayer.com/zec/nat-gateway) → gateway → **Information** → **Bind Elastic IPv4** | Pick one of the allocated EIPs                                                                             |
| 4a | Add a SNAT entry (outbound)  | Same gateway → **NAT Rules** → **Create SNAT Entry**                                                                        | Source subnets / CIDRs · outbound EIPv4                                                                    |
| 4b | Add a DNAT entry (inbound)   | Same gateway → **NAT Rules** → **Create DNAT Entry**                                                                        | EIPv4 + Public port → Private IP + Private port · Protocol (`tcp` / `udp`; `any` only with no port fields) |
| 5  | Verify VPC routes (optional) | [VPC → Route Tables](https://console.zenlayer.com/zec/route-table), filter by type **NAT Gateway**                          | Each covered subnet has a default route to the gateway                                                     |

The gateway must reach `Active` state before step 3. Each new SNAT/DNAT entry is enforced once the gateway applies the rule.

## Day-2 Operations

| Task                        | Console path                                                                                                                                                                                               |
| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Change subnet association   | Gateway detail panel → edit subnet selection                                                                                                                                                               |
| Delete a SNAT or DNAT entry | Gateway → **NAT Rules** → **Delete** on the target entry                                                                                                                                                   |
| Delete the gateway          | [Public NAT Gateway](https://console.zenlayer.com/zec/nat-gateway) → **⋯** (Actions) → **Delete**. Delete unused entries first; remaining EIPs are unbound and gateway routes are withdrawn automatically. |
| View bills and orders       | Gateway → **Information** → **Order and billing** → **View Related Orders** / **View Bill Details**                                                                                                        |
