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

วิธีปิด Network Security ทั้งหมดใน Windows 10 (ไม่แนะนำ)

⚠️ คำเตือนสำคัญ: ไม่ควรปิด Network Security / Windows Security

**ปิด Windows Security (Windows Defender) ทำให้เครื่องคอมพิวเตอร์เปราะบางต่อมัลแวร์ รูทคิท รैनซ์มเวร์ และการโจมตีจากเครือข่าย** — Microsoft **ไม่แนะนำ** และอาจทำให้ **ไม่ได้รับการปกป้องจาก Windows Update / Defender Definitions**

หากต้องการปิดชั่วคราวเพื่อ Troubleshooting / Compatibility Testing ให้ **เปิดกลับทันที** หลังเสร็จสิ้น

วิธีปิด Real-time Protection (Windows Defender Antivirus)

  1. Win+I → **Settings** → **Privacy & Security** → **Windows Security**
  2. คลิก **Virus & threat protection**
  3. คลิก **Manage settings** (Virus & threat protection settings)
  4. ปิด **Real-time protection** → **Off**
  5. หมายเหตุ: จะเปิดกลับอัตโนมัติหลังพักคราว (Tamper Protection) — ต้องปิด Tamper Protection ก่อน (ไม่แนะนำ)

วิธีปิด Windows Defender Firewall

  1. Win+I → **Settings** → **Privacy & Security** → **Windows Security**
  2. คลิก **Firewall & network protection**
  3. เลือก Network Profile: **Domain / Private / Public**
  4. ปิด **Microsoft Defender Firewall** → **Off
  5. หรือ: Control Panel → **Windows Defender Firewall** → **Turn Windows Defender Firewall on or off** → Turn off (ทั้ง Private/Public)

วิธีปิด Network Discovery & File Sharing

  1. Settings → **Network & Internet** → **Advanced network settings** → **Advanced sharing settings**
  2. **Private Network**: ปิด **Network discovery** + **File and printer sharing**
  3. **Public Network**: ปิด **Network discovery** + **File and printer sharing** (ควรเป็นค่า Default)

วิธีปิด Network Adapter (ตัดเครือข่ายโดยสิ้นเชิง)

  1. Win+R → `ncpa.cpl`
  2. คลิกขวา **Wi-Fi / Ethernet Adapter** → **Disable
  3. หรือ: Settings → Network & Internet → Advanced Network Settings → **Disable** บน Adapter นั้น

คำสั่ง PowerShell (Admin) สำหรับ Automation

# ปิด Real-time Protection (ต้องปิด Tamper Protection ก่อน)
Set-MpPreference -DisableRealtimeMonitoring $true

# ปิด Firewall (ทั้ง 3 Profile)
Set-NetFirewallProfile -All -Enabled False

# ปิด Network Discovery
Set-NetFirewallProfile -Profile Domain,Private,Public -EnableNetworkDiscovery False

# ปิด File & Printer Sharing
Set-NetFirewallRule -DisplayGroup "File and Printer Sharing" -Enabled False

สิ่งที่ควรทำแทนการปิด Security

ปัญหาวิธีแก้ที่ปลอดภัยกว่า
โปรแกรม/เกมส์ ถูก Blockเพิ่ม **Exclusion** ใน Windows Security → Virus & Threat Protection → Manage Settings → Exclusions
Port ถูก Blockสร้าง **Inbound/Outbound Rule** ใน `wf.msc` Allow Port/Protocol/Application เฉพาะที่ต้องการ
False PositiveSubmit Sample ให้ Microsoft, เพิ่ม Exclusion ชั่วคราว, ใช้ Controlled Folder Access แบบ Audit Mode
Performance Issueตั้งค่า **Scan Schedule** ให้ทำงานเวลาว่าง, Exclude Development Folders (node_modules, .git, build)
Testing Malware/Sampleใช้ **VM Isolated** (VirtualBox, VMware, Hyper-V) + Snapshot — **ไม่เคยทดสอบบน Host จริง**

Windows Security Center — ควรปิดหรือไม่?

ไม่ควรปิด** — Security Center คือ Dashboard รวมสถานะ Antivirus, Firewall, App & Browser Control, Device Security, Account Protection — การปิดมันไม่เพิ่มประสิทธิภาพ แต่ทำให้ **ไม่เห็นสถานะความปลอดภัย**

สรุป

  • ❌ **อย่าปิด Windows Security / Defender / Firewall อย่างถาวร**
  • ✅ ใช้ **Exclusions, Custom Firewall Rules, Audit Mode** แทน
  • ✅ ทดสอบมัลแวร์/ซอฟต์แวร์น่าสงสัยใน **VM แยกต่างหาก (Isolated, No Network / Host-only)**
  • ✅ หากต้องปิดชั่วคราว: **ตั้ง Timer / Reminder ให้เปิดกลับภายใน 1 ชั่วโมง**