Network Profile คืออะไร
Network Profile กำหนดระดับความไว้วางใจของเครือข่าย ส่งผลต่อ Windows Firewall Rules, Network Discovery, File/Printer Sharing
| Profile | ความไว้วางใจ | Discovery/Sharing | ใช้เมื่อไหร่ |
| Private | High | เปิด (On) | บ้าน, 辦公室, เครือข่ายที่เชื่อถือได้ |
| Public | Low | ปิด (Off) | คาเฟ่, สนามบิน, โรงแรม, Public Wi-Fi |
| Domain | Managed by AD | ตาม GPO | เครือข่ายองค์กร (Active Directory) |
วิธีเปลี่ยน Network Profile บน Windows 10/11 (GUI)
ผ่าน Settings (แนะนำ)
- Settings (Win+I) > Network & Internet
- เลือก **Wi-Fi** หรือ **Ethernet** ตามการเชื่อมต่อ
- คลิก **Properties** (หรือชื่อเครือข่าย)
- ใน **Network Profile Type** เลือก **Private** หรือ **Public**
ผ่าน Taskbar (Quick)
- คลิกไอคอน Wi-Fi/Ethernet ที่ Taskbar
- คลิก **Properties** (i) ข้างเครือข่ายที่เชื่อมต่อ
- เลือก **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
- Settings > Privacy & Security > Windows Security > Firewall & Network Protection
- คลิกเครือข่ายที่ใช้งาน (Domain/Private/Public)
- เปิด/ปิด **Microsoft Defender Firewall**
- คลิก **Advanced Settings** เพื่อจัดการ Inbound/Outbound Rules
ผ่าน wf.msc (Advanced)
- Win+R → `wf.msc` → Enter
- คลิก **Windows Defender Firewall Properties**
- แท็บ 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 ทุกครั้งที่เชื่อมเครือข่ายใหม่