October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
Redmond desk8 min

How to Set Up Windows Defender Firewall Securely: Profiles, Rules, and Logging

Keep Windows Defender Firewall on, keep its default inbound-block and outbound-allow policy, and make every exception narrow. This guide covers profiles, rule creation, logging, and troubleshooting, with notes for managed devices.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep Windows Defender Firewall turned on for all three network profiles, leave its default policy in place (inbound traffic blocked, outbound traffic allowed), and add exceptions only for a specific program, protocol, port, and network profile you can name. That combination reduces unnecessary network exposure without breaking ordinary applications. No firewall setting guarantees security, and on a managed work device some of these settings may be locked by your organization.

Before you start: personal PC or managed device

The steps below apply to a personal Windows 10 or Windows 11 computer that you administer yourself. On a work or school device, the firewall may be controlled by a domain Group Policy, a Microsoft Intune or other MDM policy, or a local security baseline. In that case, Windows Security may show a notice that some settings are managed by your organization, and local changes can be overwritten at the next policy refresh. Ask your IT team before changing a managed device, and treat any rule you create there as a request rather than a fix.

As an Amazon Associate I earn from qualifying purchases.

Changing firewall settings requires administrator rights. Microsoft’s firewall documentation covers Windows 10, Windows 11, and several Windows Server releases. Menu labels and some defaults differ between versions, so if a label below does not match your screen, check the current Microsoft Learn page for your edition.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Step 1: Confirm the firewall is on for every profile

  1. Open Start, then Settings > Privacy & security > Windows Security > Firewall & network protection.
  2. Check that the firewall status for Domain network, Private network, and Public network reads “On”. Only the network you are currently connected to is marked as active, so you may need to check the other profiles as well.
  3. For a command-line check, open Windows PowerShell as administrator and run:

    Get-NetFirewallProfile | Format-Table Name,Enabled,DefaultInboundAction,DefaultOutboundAction

    Each of the three profiles should show Enabled as True.

If a profile is off, turn it back on in Windows Security rather than stopping the firewall service. Section 6 explains why that matters.

#1 Best Overall
Sale
TP-Link ER605, Wired Gigabit VPN Router
  • 【Five Gigabit Ports】1 Gigabit WAN Port plus 2 Gigabit WAN/LAN Ports plus 2 Gigabit LAN Port. Up to 3 WAN ports optimize bandwidth usage through one device.
  • 【One USB WAN Port】Mobile broadband via 4G/3G modem is supported for WAN backup by connecting to the USB port. For complete list of compatible 4G/3G modems, please visit TP-Link website.
  • 【Abundant Security Features】Advanced firewall policies, DoS defense, IP/MAC/URL filtering, speed test and more security functions protect your network and data.
  • 【Highly Secure VPN】Supports up to 20× LAN-to-LAN IPsec, 16× OpenVPN, 16× L2TP, and 16× PPTP VPN connections.
  • Security - SPI Firewall, VPN Pass through, FTP/H.323/PPTP/SIP/IPsec ALG, DoS Defence, Ping of Death and Local Management. Standards and Protocols IEEE 802.3, 802.3u, 802.3ab, IEEE 802.3x, IEEE 802.1q

Choosing the right network profile

Windows applies one of three profiles to each network connection, and each profile can have its own rules. Choosing the wrong profile is one of the most common ways people end up with more exposure than they intended.

Profile When Windows applies it Intended use Local discovery and sharing
Domain Applied automatically when a domain-joined computer detects its domain controller Organization networks managed by Active Directory Governed by the organization’s policy
Private Chosen by you for a network you trust, such as your home network Trusted networks where local discovery or file sharing is needed Can be enabled for trusted devices on that network
Public The default for networks Windows cannot identify Hotels, airports, cafés, and any network you do not control Discovery and sharing are intended to be off

Use Public whenever you are unsure. Mark a network Private only when you control it and need local discovery or sharing. Do not mark a network Private just to make an application work; if an app fails on Public, add a narrow rule for that app on the Private profile instead.

Step 2: Keep the baseline policy

Microsoft’s documented default is that unsolicited inbound traffic is blocked unless it is a response to something your computer requested or it matches an allow rule. Outbound traffic is allowed unless a rule blocks it. For an ordinary personal PC, that baseline is the right starting point, and most people should not change it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
ASUS ExpertWiFi EBG15 Gigabit VPN Wired Router, up to 3 WAN ethernet Ports + 1 USB WAN, IPS Intrusion Prevention, Layer 7 Firewall, Commercial-Grade Network Security, Remote Management with App
  • Easier-Than-Ever Setup — Convenient and easy router management via web browser or the ASUS ExpertWiFi mobile app through Bluetooth setup.
  • VLAN for Added Security —Each of the Ethernet ports can be assigned to one or more VLAN IDs that provides additional security for your business.
  • Up to 3 WAN Ethernet Ports – 1 gigabit WAN port and 2 gigabit WAN/LAN ports with load balancing optimize multi-line broadband usage.
  • Backup WAN for Stable Connectivity –The USB port can be used as a backup WAN by connecting it to a mobile phone with hotspot to maintain a reliable internet connection.
  • Commercial-Grade Network Security and VPN — Secure public WiFi connections with Safe Browsing and VPN features. Enjoy a free-subscription ASUS AiProtection Pro, including robust intrusion prevention system (IPS) features like deep packet inspection (DPI) and virtual patching to block malicious traffic.

You can confirm or reapply the baseline in PowerShell as administrator. Microsoft’s examples are shown below; read each setting before running it, and note that the log path in the second command is the same location used by default.

  • Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True turns on all three profiles.
  • Set-NetFirewallProfile -DefaultInboundAction Block -DefaultOutboundAction Allow sets the inbound and outbound defaults. The fuller example in Microsoft’s documentation also sets notification and logging options, which you can review before applying.

Tighter outbound control, where outbound traffic is blocked by default and each permitted destination is allowed explicitly, is a legitimate organizational choice. It requires an inventory of the applications that need to connect, a staged rollout, and support time for the breakage it causes, so it is not a sensible personal default.

Step 3: Add exceptions only for a known need

Create an inbound rule for a specific program

  1. Open the advanced console by pressing Win + R, typing wf.msc, and pressing Enter.
  2. In the left pane, select Inbound Rules, then choose New Rule in the Actions pane.
  3. Select Custom if you need program, protocol, port, and address conditions together. Select Program and browse to the executable, or choose a service if the software runs as one.
  4. On the Protocols and Ports page, choose the protocol (usually TCP or UDP) and enter only the local port the application needs.
  5. On the Scope page, restrict remote IP addresses where the connection source is known. Leave it at “Any IP address” only when the application needs to accept connections from anywhere.
  6. On the Profile page, select only the profiles that need the rule. A rule for a home file-sharing service should not be enabled on Public.
  7. Give the rule a name that states the program, port, and purpose, then finish.

What makes a rule narrow

  • A specific program or service, not “all programs.”
  • A specific protocol and only the ports the application requires.
  • A remote address scope where the source is predictable.
  • The fewest profiles possible, normally Private only for a trusted-network need.
  • A clear name and a note of why the rule exists, so it can be reviewed and removed later.

A port-only rule can allow any program listening on that port, which is why Microsoft’s guidance recommends pairing rules with a specific program and restricting them to the ports needed. Avoid rules that open every port, allow all ICMP traffic, or permit every application on every profile without a documented reason.

Rank #3
Omada ER707-M2, Multi-Gigabit VPN Route
  • 【Flexible Port Configuration】1 2.5Gigabit WAN Port + 1 2.5Gigabit WAN/LAN Ports + 4 Gigabit WAN/LAN Port + 1 Gigabit SFP WAN/LAN Port + 1 USB 2.0 Port (Supports USB storage and LTE backup with LTE dongle) provide high-bandwidth aggregation connectivity.
  • 【High-Performace Network Capacity】Maximum number of concurrent sessions – 500,000. Maximum number of clients – 1000+.
  • 【Cloud Access】Remote Cloud access and Omada app brings centralized cloud management of the whole network from different sites—all controlled from a single interface anywhere, anytime.
  • 【Highly Secure VPN】Supports up to 100× LAN-to-LAN IPsec, 66× OpenVPN, 60× L2TP, and 60× PPTP VPN connections.
  • 【5 Years Warranty】Backed by our 5-years warranty and free technical support from 6am to 6pm PST Monday to Fridays

Outbound blocking is a policy decision

Because outbound traffic is allowed by default, a block rule is needed to stop an application from connecting out. Outbound blocks make sense for a specific application with a concrete policy reason, such as preventing a known program from reaching the internet. Blocking outbound traffic broadly can disrupt updates, sign-in, and sync features in ways that are hard to diagnose, so test any outbound rule on one device first and keep a record of it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Step 4: Turn on logging for troubleshooting or monitoring

Logging is useful when you are diagnosing a blocked connection or want a record of dropped traffic. It is not a substitute for other security tools and it creates files that you need to manage.

  1. In wf.msc, right-click Windows Defender Firewall with Advanced Security on Local Computer and choose Properties.
  2. On the Domain Profile, Private Profile, and Public Profile tabs, select Customize under Logging.
  3. Set Log dropped packets and, if you need it, Log successful connections to Yes. Enable only what you need, because successful-connection logs grow quickly.
  4. Confirm the file path. The default is %windir%system32logfilesfirewallpfirewall.log. You can give each profile its own file name so logs are easier to tell apart.
  5. Set the Size limit (KB) to at least 20,480 KB.
  6. Click OK, then open the log file to confirm entries are being written.
Setting Value What it means
Default maximum file size 4,096 KB Documented default in Microsoft’s current Windows Firewall logging guidance
Recommended minimum 20,480 KB (20 MB) Microsoft’s recommendation so the log does not fill too quickly
Maximum 32,767 KB (32 MB) Documented upper limit in the same guidance

When the log reaches its size limit, the oldest entries are deleted. A smaller limit means more frequent rotation, which can matter if another tool is collecting the log. These figures are configuration limits and recommendations from Microsoft; they do not measure how well any setup protects a particular computer.

Rank #4
FortiGate-40F Firewall Appliance - 5 Gigabit Ethernet RJ45 Ports, Ideal for Small Businesses (Appliance Only, No Subscription) (FG-40F)
  • Compact and Efficient Design: The FortiGate 40F is designed for small to mid-sized businesses and enterprise branch offices, featuring a compact, fanless desktop form factor that ensures quiet operation and minimizes space usage.
  • Robust Connectivity Options: Equipped with 5 GE RJ45 ports, including 1 WAN port and 4 internal ports, this model provides essential connectivity and flexibility for various network configurations in a small-scale environment.
  • High-Performance Security: Offers up to 1 Gbps IPS throughput and 600 Mbps threat protection throughput, using Fortinet’s purpose-built security processor technology to deliver industry-leading performance and protection for SSL encrypted traffic.
  • Advanced Threat Protection: Integrated with Fortinet’s AI-powered FortiGuard Labs, the FortiGate 40F offers comprehensive cybersecurity, identifying and mitigating both known and unknown threats to maintain robust security across your network.
  • Simplified Management and Deployment: Features a user-friendly management console that provides comprehensive network automation and visibility, coupled with Zero Touch Integration with Fortinet’s Security Fabric for easy deployment.

The folder must allow the Windows Firewall service to write files. If you move the log to a custom folder and no entries appear, check the folder permissions for the service account and confirm the path has no typos.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting a blocked application

Most “the app stopped working” cases come from a profile mismatch or a missing rule, not from the firewall being broken. Work through these checks in order.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Check the active profile. If the network shows as Public, rules enabled only for Private will not apply. Confirm the network profile in Windows Security before editing rules.
  • Check the rule list. In wf.msc, search Inbound Rules and Outbound Rules for the program name. Confirm the rule is enabled and that its program path still matches the installed executable, since updates can move files.
  • Check the log. If logging is enabled, look for dropped entries that reference the application’s path and port.
  • Undo your own changes. To remove a rule you created, select it in wf.msc and choose Delete. If you have changed many settings and want the defaults back, the Actions pane offers Restore Defaults, which resets the firewall configuration. Use it only after confirming that no managed policy is supposed to apply.

Do not respond to a blocked application by turning the firewall off or stopping its service. Microsoft says disabling Windows Firewall removes protections, and that stopping the service is unsupported and can cause system problems.

Best Value
Sale
TP-Link ER7206, Multi-WAN Professional Wired Gigabit VPN Router | Increased Network Capacity, SPI Firewall, Omada SDN Integrated, Load Balance, Lightning Protection
  • 【Flexible Port Configuration】1 Gigabit SFP WAN Port + 1 Gigabit WAN Port + 2 Gigabit WAN/LAN Ports plus1 Gigabit LAN Port. Up to four WAN ports optimize bandwidth usage through one device.
  • 【Increased Network Capacity】Maximum number of associated client devices – 150,000. Maximum number of clients – Up to 700.
  • 【Integrated into Omada SDN】Omada’s Software Defined Networking (SDN) platform integrates network devices including gateways, access points & switches with multiple control options offered – Omada Hardware controller, Omada Software Controller or Omada cloud-based controller(Contact TP-Link for Cloud-Based Controller Plan Details). Standalone mode also applies.
  • 【Cloud Access】Remote Cloud access and Omada app brings centralized cloud management of the whole network from different sites—all controlled from a single interface anywhere, anytime.
  • 【SDN Compatibility】For SDN usage, make sure your devices/controllers are either equipped with or can be upgraded to SDN version. SDN controllers work only with SDN Gateways, Access Points & Switches. Non-SDN controllers work only with non-SDN APs. For devices that are compatible with SDN firmware, please visit TP-Link website.

Why keeping the firewall on matters

Microsoft’s documentation states: “Microsoft recommends that you don’t disable Windows Firewall because you lose other benefits, such as the ability to use Internet Protocol security (IPsec) connection security rules, network protection from attacks that employ network fingerprinting, Windows Service Hardening, and boot time filters.” That list is the reason the firewall stays on even when you are configuring it carefully. A well-built rule set is only useful if the firewall is running to enforce it.

The firewall controls network paths. It does not inspect what is already running on your computer, and it cannot tell whether an allowed program is trustworthy. Pair it with current updates, a reputable security product, and careful review of the programs you install.

Keeping the setup current

Microsoft updates its firewall pages and Windows Security screens over time, so menu names and default values may change. Recheck the profile list, the logging settings, and any policy precedence rules after major Windows feature updates, and review your custom rules at least once a year. Remove any rule whose program no longer exists.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recorded on a managed device, the same rules can behave differently. If your organization pushes firewall policy, its settings take precedence over the local choices described here.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.