Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> ระบบเครือข่าย >> ความปลอดภัยเครือข่าย

วิธีเปลี่ยน Network Profile (Public/Private) และ Firewall Profile บน Windows 10/11

Network Profile คืออะไร

Network Profile กำหนดระดับความไว้วางใจของเครือข่าย ส่งผลต่อ Windows Firewall Rules, Network Discovery, File/Printer Sharing

วิธีเปลี่ยน Network Profile บน Windows 10/11 (GUI)

ผ่าน Settings (แนะนำ)

  1. Settings (Win+I) > Network & Internet
  2. เลือก **Wi-Fi** หรือ **Ethernet** ตามการเชื่อมต่อ
  3. คลิก **Properties** (หรือชื่อเครือข่าย)
  4. ใน **Network Profile Type** เลือก **Private** หรือ **Public**

ผ่าน Taskbar (Quick)

  1. คลิกไอคอน Wi-Fi/Ethernet ที่ Taskbar
  2. คลิก **Properties** (i) ข้างเครือข่ายที่เชื่อมต่อ
  3. เลือก **Private** หรือ **Public

ผ่าน PowerShell (Admin)

# ดู Profile ปัจจุบัน
Get-NetConnectionProfile

# เปลี่ยนเป็น Private (InterfaceAlias = "Wi-Fi" หรือ "Ethernet")
Set-NetConnectionProfile -InterfaceAlias "Wi-Fi" -NetworkCategory Private

# เปลี่ยนเป็น Public
Set-NetConnectionProfile -InterfaceAlias "Wi-Fi" -NetworkCategory Public

Firewall Profile คืออะไร

Windows Firewall มี 3 Profile ตรงกับ Network Profile: Domain, Private, Public แต่ละ Profile มีกฎ (Rules) แยกกัน

วิธีเปลี่ยน/ตั้งค่า Firewall Profile

ผ่าน Windows Security

  1. Settings > Privacy & Security > Windows Security > Firewall & Network Protection
  2. คลิกเครือข่ายที่ใช้งาน (Domain/Private/Public)
  3. เปิด/ปิด **Microsoft Defender Firewall**
  4. คลิก **Advanced Settings** เพื่อจัดการ Inbound/Outbound Rules

ผ่าน wf.msc (Advanced)

  1. Win+R → `wf.msc` → Enter
  2. คลิก **Windows Defender Firewall Properties**
  3. แท็บ Domain/Private/Public Profile → Customize Protected Network Connections

ผ่าน Registry (สำหรับ Admin/Automation)

Path: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles\{GUID}
Value: Category (0=Public, 1=Private, 2=Domain)

ทำไม Network Profile เปลี่ยนเอง (Public ↔ Private)

  • Windows Sync Settings ซิงค์ Profile ระหว่างอุปกรณ์
  • Driver/Network Adapter Reset
  • Windows Update เปลี่ยน Default Behavior
  • GPO/Domain Policy Override

แก้ไข: ปิด Sync Settings > Settings > Accounts > Windows Backup > Remember my preferences > Network profiles = Off

Best Practice

  • บ้าน/ออฟฟิศ: **Private** + Firewall On + File Sharing On (ถ้าจำเป็น)
  • สาธารณะ: **Public** + Firewall On + Sharing Off
  • Domain: จัดการโดย IT Admin ผ่าน GPO
  • ตรวจสอบ Profile ทุกครั้งที่เชื่อมเครือข่ายใหม่
Profileความไว้วางใจDiscovery/Sharingใช้เมื่อไหร่
PrivateHighเปิด (On)บ้าน, 辦公室, เครือข่ายที่เชื่อถือได้
PublicLowปิด (Off)คาเฟ่, สนามบิน, โรงแรม, Public Wi-Fi
DomainManaged by ADตาม GPOเครือข่ายองค์กร (Active Directory)