β οΈ Important: Disabling antivirus or firewall protection exposes your device to potential threats. Only disable these features temporarily and re-enable them once troubleshooting is complete.
Disable Antivirus and Firewall in Windows 11
π Disable Windows Defender Antivirus (Windows Security)
Open Windows Security
β Press Windows key + I to open Settings, then go to:
β Privacy & Security > Windows Security > Virus & threat protection
βClick "Manage settings" under Virus & threat protection settings
βToggle Real-time protection to Off
β Click Yes on the UAC prompt if it appears.
β
π Note: This will automatically re-enable after a system restart unless a third-party antivirus is installed.
π₯Disable Windows Firewall
Go to: Start > Settings > Privacy & Security > Windows Security > Firewall & network protection
βSelect your active network profile (e.g., Private network).
βToggle Microsoft Defender Firewall to Off
β Click Yes on the UAC prompt.
β
π Repeat this for all listed network profiles (Domain, Private, and Public) if needed.
π Disable Antivirus and Firewall in macOS Sonoma (macOS 14)
π‘οΈ Disable Built-in XProtect (macOS Antivirus)
macOS includes XProtect and Gatekeeper for basic malware protection. These features cannot be fully disabled via standard system preferences, but you can disable Gatekeeper using Terminal:
Open Terminal (Cmd + Space, type Terminal, press Enter)
Run the following command to disable Gatekeeper:
sudo spctl --master-disable
Enter your administrator password when prompted.
βConfirm that "Anywhere" appears in System Settings > Privacy & Security > Security.
β
π macOS will still silently run background malware scans with XProtect. Disabling it requires root-level system modifications and is not recommended.
π₯ Disable Firewall on macOS
Go to System Settings > Network > Firewall
βClick the Firewall toggle to turn it Off
βAuthenticate with Touch ID or your administrator password if prompted.
β
β Re-enabling Protection
After completing your task, itβs strongly recommended to re-enable all security features:
Windows: Toggle Real-time protection and firewall back On
βmacOS: Run
sudo spctl --master-enable
in Terminal to re-enable Gatekeeper, and turn the firewall back On
β
π Final Tips
Always keep your OS and software up-to-date to minimize vulnerabilities.
βUse trusted tools if disabling antivirus for installations.
If using third-party antivirus software, refer to the vendorβs documentation for disabling instructions.