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.

Alim Sadat avatar
Written by Alim Sadat
Updated over a month ago

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

Did this answer your question?