> For the complete documentation index, see [llms.txt](https://docs.duplocloud.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.duplocloud.com/docs/automation-platform/overview-1/gcp-services/dynamic-nat-port-allocation.md).

# Dynamic NAT Port Allocation

Dynamic NAT Port Allocation allows instances in private subnets to initiate outbound connections while efficiently managing port usage. Instead of assigning a fixed port range per instance, this feature dynamically distributes port allocation across the infrastructure.

When enabled, DuploCloud configures GCP to allocate NAT ports dynamically to instances that require outbound internet access. This reduces the number of required external IP addresses and improves scalability in NATed environments.

This feature is especially useful for:

* Highly dynamic workloads.
* Tenants running many lightweight services that occasionally connect to the internet.

## Enabling Dynamic NAT Port Allocation

To enable Dynamic NAT port allocation for a DuploCloud Infrastructure:

1. In the DuploCloud Portal, navigate to **Administrator** → **Infrastructure**.
2. Select the GCP infrastructure you want to configure from the **NAME** column.
3. Select the **Settings** tab.
4. Click **Add**. The **Infra - Set Custom Data** pane displays.<br>

   <div align="left"><figure><img src="/files/YhCQ0f3blovsB8gJJ2Zs" alt=""><figcaption><p><strong>Infra - Set Custom Data</strong> pane</p></figcaption></figure></div>
5. In the **Setting Name** field, select **Enable Dynamic NAT Port Allocation** from the list box.
6. Select **Enable**.
7. Click **Set**. Dynamic NAT Port Allocation is enabled.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.duplocloud.com/docs/automation-platform/overview-1/gcp-services/dynamic-nat-port-allocation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
