This guide provides a quick overview of managing Firewall and Antivirus settings in Windows using built-in tools like Windows Defender Firewall and Microsoft Defender Antivirus.
Control Panel > System and Security > Windows Defender FirewallSettings > Privacy & Security > Windows Security > Firewall & network protectionAllow an app through firewall
Control Panel > Allow an app or feature through Windows Defender Firewall
Turn firewall on or off
Firewall & Network Protection > Domain/Public/Private Network
netsh advfirewall set allprofiles state on # Enable firewall
netsh advfirewall set allprofiles state off # Disable firewall
netsh advfirewall firewall add rule name="AppRule" dir=in action=allow program="C:\Path\app.exe" enable=yes
Settings > Privacy & Security > Windows Security > Virus & threat protectionGet-MpComputerStatus # Show antivirus status
Set-MpPreference -DisableRealtimeMonitoring $true # Disable real-time protection
Update-MpSignature # Update virus definitions
Start-MpScan -ScanType QuickScan # Start a quick scan
| Feature | Firewall | Antivirus |
|---|---|---|
| Purpose | Control network traffic | Detect and remove malware |
| Tool | Windows Defender Firewall | Microsoft Defender Antivirus |
| Real-Time Action | Yes (for network traffic) | Yes (for threats) |
| Manual Control | netsh / GUI | PowerShell / GUI |
| Exclusions | Per-app and per-port rules | Files, folders, processes |
Task SchedulerWindows Firewall and Antivirus work together to:
Always keep both enabled and updated for best protection.