> For the complete documentation index, see [llms.txt](https://docs-epc.gitbook.io/ncs-documents/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-epc.gitbook.io/ncs-documents/internet-nat-gateway/managing-internet-nat-gateway/create-nat-gateway.md).

# Create NAT Gateway

## Prerequisite

* ต้องมียอดคงเหลือใน Project มากกว่า 0 บาท หากไม่มีเงินอยู่ใน Project ศึกษาวิธีเติมเงินได้ที่ [ขั้นตอนการเติมเงินเข้าสู่ Project](/ncs-documents/nipa-cloud-space-overview/billing-and-wallet/topup-a-project-wallet.md)

## Instructions

ขั้นตอนการสร้าง NAT Gateway ประกอบจาก 3 ขั้นตอนหลัก

1. สร้าง NAT Gateway
2. สร้าง NAT Connector
3. Attach NAT Connector

### 1. สร้าง NAT Gateway

#### 1. เข้าสู่ Project

เข้าสู่หน้า Project Detail จากการเลือก Project ที่ต้องการที่หน้า Projects Management

<figure><img src="/files/gLVJOTgWUgIQorfxMw80" alt=""><figcaption></figcaption></figure>

#### 2. เข้าสู่หน้า NAT Gateway <a href="#id-2.-compute-instance" id="id-2.-compute-instance"></a>

ที่แถบเมนูทางซ้าย คลิกเลือกเมนู​ INTERNET NAT GATEWAY > NAT Gateway เพื่อเข้าสู่หน้า NAT Gateway List

<figure><img src="/files/ZZmIrhaJiC99dyVsdR6Z" alt=""><figcaption></figcaption></figure>

#### 3. เข้าหน้า Create NAT Gateway <a href="#id-3.-launch-compute-instance" id="id-3.-launch-compute-instance"></a>

คลิกปุ่ม "Create NAT Gateway" ที่มุมขวาบนของหน้า จะเปิดหน้าต่างสำหรับสร้าง NAT Gateway ขึ้นมาดังภาพ

<figure><img src="/files/IggPJQDcMzeX2uzYy3aZ" alt=""><figcaption></figcaption></figure>

#### 4. ตั้งค่า NAT Gateway <a href="#id-4.-compute-instance-detail" id="id-4.-compute-instance-detail"></a>

เลือก option ดังนี้

<figure><img src="/files/blltDBVDtq6HZYgzUDVx" alt=""><figcaption></figcaption></figure>

1. **Name**: ตั้งชื่อให้กับ NAT Gateway
2. **Availability Zone**: เลือก Availability Zone ที่ Traffic จะวิ่งผ่าน (แนะนำให้เลือก Zone เดียวกันกับที่ Resource อื่นๆ ใช้งานอยู่ เพื่อให้ได้ Latency ที่ต่ำที่สุด)
3. **External Network**: External Network จะถูกเลือกให้อัตโนมัติตาม Availability Zone
4. **Public IP**: หรือ External IP จะต้องสร้างใหม่ หรือเลือกจาก Reserved IP ที่มีอยู่

จากการกดปุ่ม "Next" เพื่อดูสรุปก่อนสั่งสร้าง

<figure><img src="/files/S3Ly4uucUzsrcMOMVbCp" alt=""><figcaption></figcaption></figure>

หากตรวจสอบข้อมูลเรียบร้อยแล้ว ให้กดปุ่ม Create NAT Gateway

#### 5. สร้างเสร็จสิ้น

ใช้เวลาประมาณ 3-5 นาที ก่อนที่ Status ของ NAT Gateway จะกลายเป็น HEALTHY ก็ถือเป็นอันเสร็จสิ้น

<figure><img src="/files/eXcJJkpR3bofHeLymCvt" alt=""><figcaption></figcaption></figure>

### 2. สร้าง NAT Connector

ระหว่างรอให้ Status ของ NAT Gateway กลายเป็น HEALTHY สามารถเริ่มสร้าง NAT Connector ก่อนได้

#### 1. เข้าสู่หน้า NAT Connector <a href="#id-2.-compute-instance" id="id-2.-compute-instance"></a>

ที่แถบเมนูทางซ้าย คลิกเลือกเมนู​ INTERNET NAT GATEWAY > NAT Connector เพื่อเข้าสู่หน้า NAT Connector List

<figure><img src="/files/6akjQ8QjJUOcvLrhOm1B" alt=""><figcaption></figcaption></figure>

#### 2. เข้าหน้า Create NAT Connector

คลิกปุ่ม "Create NAT Connector" ที่มุมขวาบนของหน้า จะเปิดหน้าต่างสำหรับสร้าง NAT Connector ขึ้นมาดังภาพ

<figure><img src="/files/DOzks2B15D5zPqUVOt4t" alt=""><figcaption></figcaption></figure>

#### 3. เลือก VPC Network&#x20;

เลือก VPC Network ที่ต้องการใช้งาน NAT

และกดปุ่ม "Create" เพื่อเริ่มสร้าง

<figure><img src="/files/6FrctyTUAhJwg9lrp65G" alt=""><figcaption></figcaption></figure>

#### 4. สร้างเสร็จสิ้น

NAT Connector ที่สร้างจะแสดงในหน้า NAT Connector List

<figure><img src="/files/cW0gLduzsNbQfq8Q2OvR" alt=""><figcaption></figcaption></figure>

### 2. Attach NAT Connector

หลังจากที่ Status ของ NAT Gateway กลายเป็น HEALTHY และ NAT Connector สร้างเสร็จแล้ว ต่อไปจะเป็นการ Attach NAT Connector เข้ากับ NAT Gateway

#### 1. เข้าสู่หน้า NAT Gateway

ที่แถบเมนูทางซ้าย คลิกเลือกเมนู​ INTERNET NAT GATEWAY > NAT Gateway เพื่อเข้าสู่หน้า NAT Gateway List

<figure><img src="/files/FfQ6mPoUeg9XR9Ji17ue" alt=""><figcaption></figcaption></figure>

#### 2. เปิดดูรายการ NAT Connector

ใน NAT Gateway ที่ต้องการ คลิกที่ "\* NAT Connnector" ใน Column "Attachments"

<figure><img src="/files/ATAmFjYUCjlxyZxvTCrE" alt=""><figcaption></figcaption></figure>

#### 3. เข้าหน้า Attach NAT Connector

คลิกที่ปุ่ม "Attach NAT Connector" เพื่อเข้าหน้า Attach NAT Connector

<figure><img src="/files/6A7fcf77aeeGoPxAJpnt" alt=""><figcaption></figcaption></figure>

#### 4. เลือก NAT Connector เพื่อ Attach

เลือก NAT Connector ที่ต้องการเพื่อ Attach เข้ากับ NAT Gateway จากการกดปุ่ม "Attach"

<figure><img src="/files/7LjPPa5sg0nUbNmpwwh7" alt=""><figcaption></figcaption></figure>

#### 5. Attach เสร็จสิ้น

เมื่อสร้างเสร็จแล้วจะแสดงเป็นรายการ NAT Connector ภายใน NAT Gateway

<figure><img src="/files/yEZd4Vd2ucJN6HW57PBc" alt=""><figcaption></figcaption></figure>

**Result** : เมื่อเข้าไปที่ VM ของ VPC ที่ดำเนินการทำ NAT Connector และเชื่อมต่อกับ NAT Gateway จะพบว่า VM นั้นจะสามารถออก Internet ได้ทันทีโดยไม่ต้อง Attach Floating IP ดังรูป

<figure><img src="/files/H3g54KirCWxi4N413Ivp" alt=""><figcaption></figcaption></figure>


---

# 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-epc.gitbook.io/ncs-documents/internet-nat-gateway/managing-internet-nat-gateway/create-nat-gateway.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.
