⚠️ 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-enablein 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.