> 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/tutorial/how-to-use-cloudflare-with-nipa-cloud-space.md).

# How to use Cloudflare with Nipa Cloud Space

## Introduction

ในกรณีที่ต้องการใช้งาน Cloudflare ร่วมกับ Nipa Cloud Space เพื่อใช้งาน features ที่มีให้บริการบน Cloudflare เช่น DNS, CDN หรือ WAF เป็นต้น ลูกค้าสามารถดำเนินการได้ตามขั้นตอนด้านล่าง

## Prerequisite

* มี Instance ที่มี public IP บนระบบ NCS (วิธีการ [Launching Compute Instance](https://docs-epc.gitbook.io/ncs-documents/compute/compute-instance/launching-compute-instance))

## Instructions

1. เข้าไปที่ <https://www.cloudflare.com/> และ sign up เพื่อทำการสมัครการใช้งาน&#x20;

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

2. ให้เลือกเป็น Application Services และเลือก Free Package &#x20;

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

3. กรอกข้อมูล  email และ password สำหรับเข้าใช้งาน&#x20;

<figure><img src="/files/1tdPEl0J3Z3u78UqYark" alt=""><figcaption></figcaption></figure>

4. ใส่ชื่อ Domain name จากนั้นให้กด Continue   (Cloudflare จะสแกน DNS ของคุณโดยอัตโนมัติ )&#x20;

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

5. เลือกที่ Domain

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

6. เลือกแผนการใช้งาน (สามารถเลือก Free Plan ได้)&#x20;

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

7. เพื่อใช้งาน Cloudflare ต้องเปลี่ยน Nameserver ของโดเมนของคุณให้เป็นของ Cloudflare

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

หลังจากเปลี่ยนแล้ว สามารถตรวจสอบสถานะได้ที่:&#x20;

* [https://who.is](https://who.is/)&#x20;

&#x20;

\*\* ผู้ให้บริการจดโดเมน (Registrar) อาจใช้เวลาสูงสุด 24 ชั่วโมงในการประมวลผลการเปลี่ยนแปลง Nameserver (ส่วนใหญ่จะเร็วกว่านั้น)&#x20;

วิธีการ update your nameserver to active Cloudflare ได้จากหน้า overview&#x20;

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

8. ตั้งค่า DNS ให้ proxy ไปยัง IP ปลายทาง โดยการ  Add record&#x20;

* เลือก Type เป็น A &#x20;
* ใส่ domain name กับ ip address ปลายทาง  &#x20;
* Enable Proxied &#x20;
* Save การตั้งค่า&#x20;

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

9. สามารถเข้ามาแก้ไข หรือ add dns records ได้จากแท็บด้านซ้าย เลือก DNS > Records&#x20;

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