วิธีติดตั้ง Certificate Services (AD CS) บน Windows Server 2025 แบบละเอียด

Active Directory Certificate Services หรือ AD CS คือระบบสำหรับออก Certificate ภายในองค์กร เพื่อใช้กับ:

  • HTTPS
  • VPN
  • Wi-Fi Enterprise
  • Smart Card
  • RDP
  • Code Signing
  • Device Authentication

หลายองค์กรเริ่มใช้ Certificate มากขึ้น เพราะ Password อย่างเดียวไม่เพียงพออีกต่อไป โดยเฉพาะระบบ Zero Trust และ Security สมัยใหม่ ซึ่งบน Windows Server 2025 สามารถสร้างระบบ CA (Certificate Authority) ภายในองค์กรได้เองผ่าน AD CS

องค์กรขนาดกลางและใหญ่จำนวนมาก รวมถึงแนวทางที่ทีม comsiam ใช้ มักมี Internal CA สำหรับออก Certificate ให้เครื่องและระบบต่างๆ ภายในองค์กร

บทความนี้จะสอนการติดตั้ง AD CS แบบละเอียด พร้อมแนวทางใช้งานจริง


① Certificate Services คืออะไร

Certificate Services คือระบบ:
ออก Digital Certificate

ใช้ยืนยันตัวตน:

  • User
  • Computer
  • Website
  • Device

② Certificate คืออะไร

Certificate เปรียบเหมือน:
บัตรประชาชนดิจิทัล

ใช้:

  • ยืนยันตัวตน
  • เข้ารหัสข้อมูล
  • สร้าง Trust

③ AD CS ใช้ทำอะไรได้บ้าง

ตัวอย่าง:

  • HTTPS ภายในองค์กร
  • Wi-Fi 802.1X
  • VPN
  • Smart Card Login
  • Auto Enrollment

④ CA คืออะไร

CA ย่อมาจาก:

Certificate Authority

คือเครื่องที่:
ออก Certificate


⑤ ประเภทของ CA

หลักๆ มี:

  • Enterprise CA
  • Standalone CA

องค์กรส่วนใหญ่นิยม:

Enterprise CA

⑥ สิ่งที่ต้องมี ก่อนติดตั้ง AD CS

ต้องมี:

  • ติดตั้ง Active Directory แล้ว
  • Server ใช้ Static IP
  • DNS พร้อมใช้งาน

⑦ วิธีเปิด Add Roles and Features

เปิด:

Server Manager
> Add Roles and Features

⑧ วิธีเลือก Active Directory Certificate Services

ใน Server Roles

ติ๊ก:

Active Directory Certificate Services

กด:

Add Features

⑨ Role Services ที่นิยมติดตั้ง

นิยม:

  • Certification Authority
  • Certification Authority Web Enrollment

⑩ วิธีเริ่ม Configure AD CS

หลังติดตั้งเสร็จ

กดธงสีเหลือง

เลือก:

Configure Active Directory Certificate Services

⑪ วิธีเลือก CA Type

เลือก:

Certification Authority

⑫ วิธีเลือก Enterprise CA

เลือก:

Enterprise CA

ข้อดี:

  • ใช้ร่วมกับ AD ได้
  • Auto Enrollment ได้

⑬ วิธีเลือก Root CA

เลือก:

Root CA

กรณีเป็น CA ตัวแรกขององค์กร


⑭ วิธีสร้าง Private Key

เลือก:

Create a new private key

⑮ วิธีเลือก Cryptography

แนะนำ:

  • RSA
  • 2048 หรือ 4096 bit
  • SHA256

⑯ วิธีตั้งชื่อ CA

ตัวอย่าง:

COMSIAM-ROOT-CA

ควรตั้งชื่ออ่านง่าย


⑰ วิธีตั้งอายุ Certificate

แนะนำ:

5 Years

Root CA อาจใช้:

10 Years

⑱ วิธีตั้ง Database Location

ค่า Default ใช้ได้เลย

หรือแยก Disk สำหรับองค์กรใหญ่


⑲ วิธีเปิด Certification Authority Console

ใช้:

certsrv.msc

⑳ วิธีดู Certificate ที่ออกแล้ว

ใน Console

ดูที่:

Issued Certificates

㉑ วิธีใช้ Web Enrollment

เปิด Browser:

http://servername/certsrv

สามารถ:

  • Request Certificate
  • Download Certificate

ผ่าน Web ได้


㉒ วิธีใช้ Auto Enrollment

ใช้ GPO:

Public Key Policies

ช่วยให้:
เครื่อง Client รับ Certificate อัตโนมัติ


㉓ วิธีตรวจสอบ CA Service

ใช้:

sc query certsvc

ควรขึ้น:

RUNNING

㉔ ปัญหาที่พบบ่อย

Certificate ออกไม่ได้

สาเหตุ:
Permission ผิด


Auto Enrollment ไม่ทำงาน

สาเหตุ:
GPO ไม่ Apply


HTTPS ไม่ Trust

สาเหตุ:
Client ไม่รู้จัก Root CA


㉕ วิธี Backup CA

สำคัญมาก

Backup:

  • Private Key
  • Database
  • Certificate

หาก CA หาย:
Certificate ทั้งองค์กรอาจใช้ไม่ได้


㉖ แนวทาง AD CS ที่ดีสำหรับองค์กร

แนะนำ:

  • แยก Offline Root CA
  • ใช้ Issuing CA
  • Backup สม่ำเสมอ
  • ใช้ SHA256+

หลายองค์กรติดตั้ง CA แบบง่ายเกินไปจน Security ต่ำ ซึ่งทีม comsiam มักแนะนำให้วาง PKI Architecture ตั้งแต่ต้น


㉗ สิ่งที่ไม่ควรทำ

ไม่ควร:

  • ใช้ SHA1
  • ใช้ Key 1024
  • ไม่ Backup CA
  • ติดตั้ง CA บน Server มั่วๆ

㉘ AD CS กับ Public CA ต่างกันยังไง

AD CS

ใช้ภายในองค์กร


Public CA

เช่น:

  • DigiCert
  • Sectigo
  • Let’s Encrypt

ใช้กับ Internet Public


㉙ สรุป

Active Directory Certificate Services บน Windows Server 2025 คือระบบสำคัญสำหรับสร้าง PKI และ Certificate ภายในองค์กร

ข้อดี:

  • เพิ่ม Security
  • ใช้ HTTPS ภายในได้
  • รองรับ Zero Trust
  • รองรับ Auto Enrollment

โดยเฉพาะองค์กรที่ต้องการ Security สูง AD CS ถือเป็นพื้นฐานสำคัญของระบบ Windows Enterprise สมัยใหม่