Firewall Rules
Configure Windows Defender Firewall rules through Intune endpoint security policies. Define inbound and outbound traffic rules for domain, private, and public network profiles.
Firewall Profiles
Domain Profile
Active when connected to a corporate domain network. Typically the least restrictive for domain services.
Private Profile
Active on trusted private networks (home or office). Moderate restriction level.
Public Profile
Active on untrusted public networks. Most restrictive settings.
Default Behavior
| Setting | Recommended |
|---|---|
| Firewall Enabled | Yes (all profiles) |
| Inbound Default | Block |
| Outbound Default | Allow |
| Stealth Mode | Enabled |
| Logging Dropped Packets | Enabled |
Creating Custom Rules
| Property | Description |
|---|---|
| Name | Descriptive rule name |
| Direction | Inbound or Outbound |
| Action | Allow or Block |
| Protocol | TCP, UDP, ICMP, or Any |
| Local Ports | Port numbers or ranges |
| Remote Ports | Port numbers or ranges |
| Local Address | IP addresses or ranges |
| Remote Address | IP addresses or ranges |
| Application Path | Full path to the executable |
| Profile | Domain, Private, Public, or All |
Common Rule Examples
Allow RDP (Inbound)
- Direction: Inbound, Protocol: TCP, Local Port: 3389, Action: Allow, Profile: Domain
Block Telnet (Outbound)
- Direction: Outbound, Protocol: TCP, Remote Port: 23, Action: Block, Profile: All
Deploying Firewall Policies
- Create an endpoint security Firewall policy in Intune
- Select platform (Windows 10/11)
- Choose profile type (Firewall or Firewall Rules)
- Configure profile settings or individual rules
- Assign to device groups
Rule Processing Priority
- Authenticated bypass rules (highest)
- Block connection rules
- Allow connection rules
- Default profile behavior (lowest)
Monitoring
- Firewall enabled/disabled status per device
- Policy deployment success and failures
- Rule conflicts between overlapping policies
- Blocked connection events
Best Practices
- Enable firewall on all three profiles
- Block inbound by default, create specific allow rules
- Use application-based rules over port-based
- Enable dropped packet logging
- Test rules on pilot devices first
- Document all custom rules
API Reference
GET /api/devices/firewall/policies— List policiesPOST /api/devices/firewall/policies— Create policyGET /api/devices/firewall/rules— List rulesGET /api/devices/firewall/status— Get status
Last updated on