SNSSimple Network Solutions
Article complete
IT Guides12 min readApril 16, 2026

How to Configure Windows Defender Firewall: Inbound/Outbound Rules, App Exceptions & Remote Management

Windows Defender Firewall is your first line of defense against unauthorized network access — but its default settings leave gaps that attackers exploit. This step-by-step guide covers creating inbound and outbound rules, allowing application exceptions, and managing firewall policy remotely across a business network.

MD

Marco Delgado

Senior Cybersecurity Specialist · Simple Network Solutions

CISSP · CEH · CompTIA Security+ · CISM · 14 Years Experience

CybersecurityPenetration TestingHIPAA/FINRA ComplianceIncident Response
How to Configure Windows Defender Firewall: Inbound/Outbound Rules, App Exceptions & Remote Management

Windows Defender Firewall is built into every version of Windows and is active by default — but "active" does not mean "correctly configured." The default settings allow most outbound traffic freely and block most unsolicited inbound traffic, which is a reasonable starting point. But for business environments, the defaults leave significant gaps: applications can phone home without restriction, remote management ports may be unnecessarily exposed, and there is no visibility into what traffic is actually flowing through the firewall. This guide walks through everything from basic rule creation to advanced remote management configuration.

Before making changes: Windows Defender Firewall with Advanced Security is a powerful tool. Incorrectly blocking traffic can disrupt business applications, remote access, and network services. Always test rule changes on a non-production machine first, and document every rule you create so you can reverse changes if needed.

Understanding Windows Defender Firewall: The Two Interfaces

  • Basic interface (Control Panel): Accessed via Control Panel → System and Security → Windows Defender Firewall. Provides simple on/off controls and basic allowed apps management. Suitable for home users.
  • Advanced Security interface (wf.msc): The full firewall management console with granular control over inbound rules, outbound rules, connection security rules, and monitoring. This is what IT administrators use and what this guide focuses on.
  • Group Policy / Intune: For managing firewall settings across multiple computers in a business environment. Covered in Part 4 of this guide.

Part 1: Opening Windows Defender Firewall with Advanced Security

Get monthly IT tips for Miami businesses

No spam · Unsubscribe anytime · Practical advice only

  1. 1Press Windows key + R to open the Run dialog.
  2. 2Type wf.msc and press Enter. Click Yes if prompted by User Account Control.
  3. 3The Windows Defender Firewall with Advanced Security console opens. You will see three main sections in the left panel: Inbound Rules, Outbound Rules, and Connection Security Rules.
  4. 4The center panel shows an overview of the current firewall profile status (Domain, Private, and Public networks).
  5. 5Alternatively, you can open it by searching "Windows Defender Firewall with Advanced Security" in the Start menu, or by going to Control Panel → System and Security → Windows Defender Firewall → Advanced settings.

Part 2: Understanding Firewall Profiles

Windows Defender Firewall uses three network profiles, and rules can be applied to one, two, or all three:

  • Domain profile: Applied when the computer is connected to a network where it can authenticate to a domain controller. Used for corporate network connections. Typically the most permissive profile.
  • Private profile: Applied when the computer is connected to a network the user has designated as private (home or small office). Moderately restrictive.
  • Public profile: Applied when the computer is connected to a public network (coffee shop, airport, hotel). Most restrictive — blocks most inbound connections.

Pro Tip

For business laptops that travel, ensure your most restrictive rules apply to the Public profile. Employees connecting from coffee shops or airports should have the same protection as if they were on an untrusted network — because they are.

Part 3: Creating Inbound Rules

Inbound rules control traffic coming into your computer from the network. By default, Windows blocks most unsolicited inbound connections. You create inbound rules to allow specific traffic that you need.

Example: Allow Remote Desktop (RDP) Only from Specific IP Addresses

This is one of the most important firewall configurations for business computers. RDP (port 3389) is a top ransomware entry point when exposed broadly. Restricting it to specific IP addresses dramatically reduces risk.

  1. 1In the Windows Defender Firewall with Advanced Security console, click "Inbound Rules" in the left panel.
  2. 2In the right panel (Actions), click "New Rule..."
  3. 3The New Inbound Rule Wizard opens. Select "Port" as the rule type and click Next.
  4. 4Select "TCP" and enter "3389" in the "Specific local ports" field. Click Next.
  5. 5Select "Allow the connection" and click Next.
  6. 6Choose which profiles this rule applies to. For RDP, select Domain and Private only — do not allow RDP on the Public profile. Click Next.
  7. 7Give the rule a descriptive name: "Allow RDP from IT Admin IPs" and optionally add a description. Click Finish.
  8. 8The rule is created but currently allows RDP from any IP. To restrict it to specific IPs: right-click the new rule and select Properties.
  9. 9Click the "Scope" tab.
  10. 10Under "Remote IP address," select "These IP addresses" and click Add.
  11. 11Enter the specific IP address or IP range that should be allowed to connect via RDP (e.g., your IT administrator's IP or your office network range). Click OK.
  12. 12Click Apply and OK. RDP is now only accessible from the specified IP addresses.

Example: Allow a Specific Application to Receive Inbound Connections

  1. 1In the Inbound Rules section, click "New Rule..." in the Actions panel.
  2. 2Select "Program" as the rule type and click Next.
  3. 3Select "This program path" and click Browse to navigate to the application's executable file (e.g., C:\Program Files\YourApp\app.exe). Click Next.
  4. 4Select "Allow the connection" and click Next.
  5. 5Choose the appropriate profiles (Domain, Private, Public) and click Next.
  6. 6Name the rule descriptively (e.g., "Allow YourApp Inbound") and click Finish.

Example: Block All Inbound Traffic on a Specific Port

  1. 1In the Inbound Rules section, click "New Rule..."
  2. 2Select "Port" and click Next.
  3. 3Select TCP or UDP and enter the port number you want to block. Click Next.
  4. 4Select "Block the connection" and click Next.
  5. 5Select all profiles (Domain, Private, Public) and click Next.
  6. 6Name the rule (e.g., "Block Port 23 Telnet") and click Finish.

Rule priority: Windows Defender Firewall processes rules in order of specificity. Block rules take precedence over Allow rules when they match the same traffic. If you have a broad "Allow" rule and a specific "Block" rule for the same port, the Block rule wins. Use this to your advantage: create broad allow rules for legitimate traffic, then add specific block rules for known-bad sources.

Part 4: Creating Outbound Rules

Outbound rules control traffic leaving your computer. By default, Windows allows all outbound traffic — which means malware, ransomware, and unauthorized applications can freely communicate with external servers. Restricting outbound traffic is more complex but significantly improves security.

Strategy: Default-Deny Outbound (Advanced — Business Environments)

The most secure approach is to block all outbound traffic by default and then create explicit allow rules for approved applications and services. This prevents unauthorized applications from communicating externally.

  1. 1In the Windows Defender Firewall with Advanced Security console, click "Windows Defender Firewall with Advanced Security" at the top of the left panel.
  2. 2In the center panel, click "Windows Defender Firewall Properties."
  3. 3Click the "Domain Profile" tab (or Private/Public as appropriate).
  4. 4Under "Outbound connections," change the dropdown from "Allow (default)" to "Block."
  5. 5Click Apply. All outbound traffic on this profile is now blocked.
  6. 6Now create explicit allow rules for required traffic (see examples below).

Warning: Switching to default-deny outbound will immediately break internet access, Windows Update, DNS resolution, and all network-dependent applications until you create allow rules. Only do this if you have a complete list of required outbound traffic and can create the necessary rules before applying the change — or if you are working on a test machine.

Example: Allow DNS Resolution (Required for Internet Access)

  1. 1In the Outbound Rules section, click "New Rule..."
  2. 2Select "Port" and click Next.
  3. 3Select "UDP" and enter "53" in the Specific remote ports field. Click Next.
  4. 4Select "Allow the connection" and click Next.
  5. 5Select all profiles and click Next.
  6. 6Name the rule "Allow DNS Outbound (UDP 53)" and click Finish.
  7. 7Repeat for TCP port 53 (some DNS queries use TCP for large responses).

Example: Allow HTTPS Traffic (Web Browsing and Cloud Services)

  1. 1Create a new Outbound Rule → Port → TCP → Specific remote ports: 443.
  2. 2Allow the connection → All profiles → Name: "Allow HTTPS Outbound (TCP 443)".
  3. 3Also create a rule for TCP port 80 (HTTP) if needed: "Allow HTTP Outbound (TCP 80)".

Example: Block a Specific Application from Accessing the Internet

  1. 1In the Outbound Rules section, click "New Rule..."
  2. 2Select "Program" and click Next.
  3. 3Browse to the application's executable file. Click Next.
  4. 4Select "Block the connection" and click Next.
  5. 5Select all profiles and click Next.
  6. 6Name the rule (e.g., "Block [AppName] Outbound") and click Finish.

Part 5: Managing Application Exceptions

Application exceptions allow specific programs to communicate through the firewall without creating detailed port-based rules. This is the simplest way to allow a business application that needs network access.

Method 1: Allow an App Through the Basic Firewall Interface

  1. 1Open Control Panel → System and Security → Windows Defender Firewall.
  2. 2Click "Allow an app or feature through Windows Defender Firewall" in the left panel.
  3. 3Click "Change settings" (requires administrator privileges).
  4. 4Scroll through the list to find your application. If it is listed, check the boxes for the network profiles (Domain, Private, Public) where you want to allow it.
  5. 5If the application is not listed, click "Allow another app..." and browse to the executable file.
  6. 6Click OK to save.

Method 2: Create an Application Rule in Advanced Security (More Control)

  1. 1In the Advanced Security console, create a new Inbound Rule (and/or Outbound Rule).
  2. 2Select "Program" as the rule type.
  3. 3Browse to the application executable.
  4. 4Choose "Allow the connection."
  5. 5Select the appropriate profiles.
  6. 6Name the rule and click Finish.
  7. 7This method gives you additional control: you can restrict the rule to specific IP addresses, ports, or users by editing the rule properties after creation.

Part 6: Remote Firewall Management for Business Environments

Managing firewall settings on individual computers one at a time is not practical for businesses with multiple machines. Windows provides several methods for centralized remote firewall management.

Method 1: Group Policy (On-Premises Active Directory)

Group Policy is the standard method for deploying firewall rules across all computers in an Active Directory domain.

  1. 1On your domain controller, open Group Policy Management (gpmc.msc).
  2. 2Create a new Group Policy Object (GPO) or edit an existing one.
  3. 3Navigate to: Computer Configuration → Windows Settings → Security Settings → Windows Defender Firewall with Advanced Security.
  4. 4Right-click "Inbound Rules" and select "New Rule" to create rules that will be pushed to all computers the GPO applies to.
  5. 5Configure the rule exactly as you would in the local Advanced Security console.
  6. 6Link the GPO to the appropriate Organizational Unit (OU) in Active Directory.
  7. 7Run gpupdate /force on client machines or wait for the next Group Policy refresh (every 90 minutes by default).
  8. 8To verify the policy applied: on a client machine, open wf.msc and look for rules with a "Group Policy" source in the rule properties.

Method 2: Microsoft Intune (Microsoft 365 / Azure AD Environments)

For organizations using Microsoft 365 Business Premium or Azure AD with Intune, firewall policies can be deployed and managed through the Intune admin center.

  1. 1Sign in to the Intune admin center at intune.microsoft.com.
  2. 2Navigate to Endpoint security → Firewall.
  3. 3Click "Create Policy."
  4. 4Select "Windows 10, Windows 11, and Windows Server" as the platform and "Microsoft Defender Firewall" as the profile.
  5. 5Click Create.
  6. 6On the Configuration settings page, configure the firewall settings: enable the firewall for each profile, set default inbound/outbound behavior, and configure specific rules.
  7. 7To add specific firewall rules, scroll to "Microsoft Defender Firewall rules" and click "Add."
  8. 8Configure each rule with name, direction (inbound/outbound), action (allow/block), protocol, local/remote ports, and local/remote addresses.
  9. 9Assign the policy to the appropriate device groups.
  10. 10Click Create. The policy will be pushed to enrolled devices automatically.

Method 3: Remote Management via MMC (Individual Computers)

For managing the firewall on a specific remote computer without Group Policy or Intune, you can connect to it remotely using the MMC console.

  1. 1First, ensure the remote computer allows remote management. On the remote computer, run this command in an elevated Command Prompt: netsh advfirewall firewall set rule group="Windows Defender Firewall Remote Management" new enable=yes
  2. 2On your management computer, press Windows key + R, type mmc, and press Enter.
  3. 3In the MMC console, click File → Add/Remove Snap-in.
  4. 4Select "Windows Defender Firewall with Advanced Security" and click Add.
  5. 5Select "Another computer" and enter the remote computer's name or IP address.
  6. 6Click Finish, then OK.
  7. 7You can now manage the remote computer's firewall rules directly from your management console.

Method 4: PowerShell for Firewall Management

PowerShell provides the most flexible option for scripting firewall changes across multiple computers.

  • View all firewall rules: Get-NetFirewallRule | Select-Object DisplayName, Direction, Action, Enabled
  • Create a new inbound rule: New-NetFirewallRule -DisplayName "Allow App X" -Direction Inbound -Program "C:\Path\To\App.exe" -Action Allow -Profile Domain,Private
  • Block a specific port: New-NetFirewallRule -DisplayName "Block Port 23" -Direction Inbound -Protocol TCP -LocalPort 23 -Action Block
  • Disable a rule: Disable-NetFirewallRule -DisplayName "Rule Name"
  • Remove a rule: Remove-NetFirewallRule -DisplayName "Rule Name"
  • Run on a remote computer: Invoke-Command -ComputerName RemotePC -ScriptBlock { New-NetFirewallRule -DisplayName "Allow RDP" -Direction Inbound -Protocol TCP -LocalPort 3389 -Action Allow }

Part 7: Monitoring and Auditing Firewall Activity

Enable Firewall Logging

  1. 1In the Advanced Security console, click "Windows Defender Firewall with Advanced Security" at the top of the left panel.
  2. 2Click "Windows Defender Firewall Properties" in the center panel.
  3. 3Click the "Domain Profile" tab (repeat for Private and Public).
  4. 4Under "Logging," click Customize.
  5. 5Set "Log dropped packets" to Yes — this records all traffic that the firewall blocked.
  6. 6Set "Log successful connections" to Yes if you want to see all allowed traffic (generates large log files — use selectively).
  7. 7Set the log file size limit (default 4MB — increase to 32MB or more for active monitoring).
  8. 8Note the log file path (default: %systemroot%\system32\LogFiles\Firewall\pfirewall.log).
  9. 9Click OK and Apply.

Viewing Firewall Logs

  • Open the log file directly: navigate to C:\Windows\System32\LogFiles\Firewall\pfirewall.log in Notepad or a text editor.
  • Each line shows: date, time, action (ALLOW or DROP), protocol, source IP, destination IP, source port, destination port, and other details.
  • Look for repeated DROP entries from the same source IP — this may indicate a port scan or brute-force attempt.
  • Look for unexpected ALLOW entries to unusual destination IPs — this may indicate malware communicating externally.
  • For easier analysis, import the log into Excel or use a log analysis tool like Log Parser Studio.

Using Windows Event Viewer for Firewall Events

  1. 1Press Windows key + R, type eventvwr.msc, and press Enter.
  2. 2Navigate to: Applications and Services Logs → Microsoft → Windows → Windows Firewall with Advanced Security → Firewall.
  3. 3This log shows firewall rule changes, policy changes, and connection events.
  4. 4Event ID 2004: A rule was added to the firewall.
  5. 5Event ID 2006: A rule was deleted from the firewall.
  6. 6Event ID 2033: All rules were deleted from the firewall (potential security incident).

Part 8: Essential Firewall Rules for Business Environments

Here is a recommended baseline set of firewall rules for a typical Windows 11 business computer:

Inbound Rules to Create

  • Block RDP (TCP 3389) on Public profile — prevent remote desktop access on untrusted networks
  • Allow RDP (TCP 3389) on Domain/Private profile from specific IT admin IPs only
  • Block SMB (TCP 445) on Public profile — prevent file sharing exposure on public networks
  • Allow ICMP (ping) on Domain/Private profile — needed for network diagnostics
  • Block Telnet (TCP 23) on all profiles — Telnet is unencrypted and should never be used
  • Allow your specific business applications on Domain/Private profiles as needed

Outbound Rules to Consider

  • Allow DNS (UDP/TCP 53) — required for name resolution
  • Allow HTTPS (TCP 443) — required for web browsing and cloud services
  • Allow HTTP (TCP 80) — required for some web services and Windows Update
  • Allow NTP (UDP 123) — required for time synchronization
  • Allow SMTP (TCP 587) — for email clients that send mail directly
  • Block outbound connections from known-bad applications or processes if detected

Part 9: Troubleshooting Common Firewall Issues

Application Cannot Connect to Network

  • Check if the application is blocked: open wf.msc → Outbound Rules → look for a block rule matching the application.
  • Temporarily disable the firewall to test: if the application works with the firewall off, a firewall rule is blocking it.
  • Use the Windows Firewall Troubleshooter: Settings → System → Troubleshoot → Other troubleshooters → Internet Connections.
  • Check the firewall log for DROP entries matching the application's traffic.
  • Create an explicit allow rule for the application (see Part 5).

Remote Management Not Working

  • Ensure the "Windows Defender Firewall Remote Management" rule group is enabled on the remote computer.
  • Verify the Windows Remote Management (WinRM) service is running: services.msc → Windows Remote Management.
  • Check that the remote computer's firewall allows WinRM (TCP 5985 for HTTP, TCP 5986 for HTTPS).
  • Ensure you are connecting from an IP address that is allowed by the remote computer's firewall rules.

Group Policy Firewall Rules Not Applying

  • Run gpupdate /force on the client machine and check again.
  • Run gpresult /r to verify the GPO is being applied to the computer.
  • Check for conflicting local firewall rules — local rules can conflict with GPO rules.
  • Verify the GPO is linked to the correct OU containing the computer account (not just the user account).
  • Check Event Viewer → System for Group Policy errors.

Pro Tip

For Miami businesses that need centralized firewall management across multiple Windows 11 computers — including policy deployment, monitoring, and incident response — Simple Network Solutions manages Windows Defender Firewall as part of our managed IT service. We configure rules appropriate for your specific business applications, monitor firewall logs for suspicious activity, and respond to alerts. Call (786) 383-2066 or visit our Services page to learn more.

Free Newsletter

Stay ahead of Miami's IT threats & trends

Monthly insights written for South Florida business owners — covering cybersecurity alerts, cost-saving IT strategies, and Miami-specific technology advice.

Cybersecurity alertsCost-saving tipsMiami business focused

No spam. Unsubscribe anytime.

About the Author

MD

Marco Delgado

Senior Cybersecurity Specialist · 14 years experience

CISSP · CEH · CompTIA Security+ · CISM · 14 Years Experience

Marco leads cybersecurity operations at Simple Network Solutions, with 14 years of experience in network security, penetration testing, and compliance for regulated industries. He has responded to over 200 security incidents for Miami businesses and holds four active cybersecurity certifications. He regularly presents at South Florida IT security events and contributes to the FBI InfraGard Miami chapter.

Share:
Ready to Take Action

Questions? Our Miami IT team is standing by.

Turn what you just read into action. Schedule a free consultation with our local team — no sales pressure, just honest technology advice for your Miami business.