How to Configure Windows Firewall to Block Unwanted Inbound Connections

Block risky inbound traffic with the right Windows Firewall settings and rules, and use Kudu to help tighten system security.

By the Kudu Team

Fix this automatically with Kudu

Run a free system scan to detect and resolve this issue automatically — no manual steps required.

Download Kudu Free →

What Causes This?

Windows Firewall may allow inbound connections because of default app exceptions, old rules you no longer need, or network settings that are too permissive for your current environment. This often happens after installing software that opens ports automatically, changing network profiles, or turning firewall protections off for troubleshooting and forgetting to re-enable them. On shared, public, or poorly secured networks, these open inbound paths can increase the risk of unwanted access.

Common Symptoms

  • Apps or services are reachable from other devices when they should not be
  • You notice open ports during a security scan
  • Windows Firewall shows many allowed apps or inbound rules you do not recognize
  • File sharing, remote desktop, or game/server features are exposed on public networks
  • Security tools warn that inbound traffic is not properly restricted

How to Fix It Manually

  1. Open Windows Defender Firewall with Advanced Security

    • Press Windows + S, type Windows Defender Firewall with Advanced Security, and open it.
    • This view gives you full control over inbound rules, not just basic on/off settings.
  2. Make sure the firewall is enabled for all network profiles

    • In the left pane, click Windows Defender Firewall with Advanced Security on Local Computer.
    • In the middle pane, check the Domain Profile, Private Profile, and Public Profile.
    • If any profile says the firewall is off, click Windows Defender Firewall Properties in the right pane.
    • For each profile tab, set Firewall state to On, then click Apply.
  3. Block inbound connections by default where appropriate

    • In the same Properties window, review each profile tab.
    • Under Inbound connections, choose Block (default).
    • Leave outbound connections as the default unless you have a specific reason to change them.
    • Click Apply and OK.
    • This blocks unsolicited inbound traffic unless a rule explicitly allows it.
  4. Review and disable unnecessary inbound rules

    • In the left pane, click Inbound Rules.
    • Sort by the Enabled or Action column to find active Allow rules.
    • Look for rules tied to apps or features you do not use, such as old remote access tools, game servers, file sharing, or third-party software.
    • Right-click a rule and choose Disable Rule instead of deleting it first. That makes it easy to reverse if something stops working.
  5. Restrict risky services on public networks

    • In Inbound Rules, check rules for:
      • File and Printer Sharing
      • Remote Desktop
      • Network Discovery
      • Third-party remote support or server apps
    • Double-click a rule, open the Advanced tab, and uncheck Public if the rule should only work on trusted networks.
    • Click Apply and OK.
  6. Remove app exceptions you no longer want

    • Press Windows + R, type control, and press Enter.
    • Go to System and Security > Windows Defender Firewall > Allow an app or feature through Windows Defender Firewall.
    • Click Change settings.
    • Uncheck apps you do not want accepting inbound connections, or remove entries you no longer recognize.
    • Be careful not to disable security software or tools you actively use.
  7. Test that the changes worked

    • Restart the app or service you changed, or restart your PC if needed.
    • If something legitimate stops working, go back and re-enable only the specific rule required.
    • Keep the Public profile stricter than Private whenever possible, especially on laptops.

Fix It Automatically with Kudu

Kudu can scan your system for risky firewall settings, unnecessary startup and background software, and other security weaknesses that make your PC more exposed than it needs to be. Instead of digging through advanced firewall rules manually, you can use Kudu to identify common misconfigurations and tighten your Windows setup faster.

Download Kudu Free →

Fix this automatically with Kudu

Run a free system scan to detect and resolve this issue automatically — no manual steps required.

Download Kudu Free →