Skip to main content

How to Disable Antivirus and Firewall on Windows and macOS

Learn how to temporarily disable antivirus and firewall on Windows 11 and macOS Sonoma

D
Written by Dragana

⚠️ 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)

  1. Open Windows Security
    Press Windows key + I to open Settings, then go to:
    Privacy & Security > Windows Security > Virus & threat protection

  2. Click "Manage settings" under Virus & threat protection settings

  3. 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

  1. Go to: Start > Settings > Privacy & Security > Windows Security > Firewall & network protection

  2. Select your active network profile (e.g., Private network).

  3. 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:

  1. Open Terminal (Cmd + Space, type Terminal, press Enter)

Run the following command to disable Gatekeeper:

sudo spctl --master-disable

  1. Enter your administrator password when prompted.

  2. 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

  1. Go to System Settings > Network > Firewall

  2. Click the Firewall toggle to turn it Off

  3. 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

Did this answer your question?