Overview
Windows Defender Firewall is the built-in firewall solution in Windows operating systems. It provides basic functionality for allowing or denying specific programs and supports customized inbound and outbound rules. Automatically applies firewall profiles based on the detected network type via Network Location Awareness (NLA).
Target / Context
Windows systems requiring host-based firewall configuration. Applies different rule sets based on network profile — Domain, Private, or Public.
Installation
Installation Commands:
Built into Windows — no installation required Open via:
wf.msc
Or: Control Panel -> Windows Defender Firewall
Basic Usage
Basic Usage:
wf.msc
Flags & Options
Flags & Options:
| Option | Description |
|---|---|
| Inbound Rules | Controls traffic coming into the system |
| Outbound Rules | Controls traffic leaving the system |
| Domain Profile | Applied when connected to a domain network |
| Private Profile | Applied when connected to a trusted home network |
| Public Profile | Applied when connected to untrusted public networks |
Common Use Cases
View or Change Network Profile
Windows automatically selects a profile based on NLA. Profiles apply different rule sets.
Steps:
Control Panel -> Windows Defender Firewall View current profile: Domain / Private / Public
Create a Custom Outbound or Inbound Rule
Steps:
- Open
wf.msc - Click Advanced Settings on the left side
- Click Outbound Rules or Inbound Rules
- Click New Rule
- Select Custom
- Select All Programs
- Select protocol type: TCP
- Keep Local Port as default
- Change Remote Port to Specific Ports
- Specify the ports to block
- In the Scope tab keep defaults
- In the Action tab select Block the connection
- Name and save the rule