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
-
Open Windows Defender Firewall with Advanced Security
- Press
Windows + S, typeWindows Defender Firewall with Advanced Security, and open it. - This view gives you full control over inbound rules, not just basic on/off settings.
- Press
-
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.
-
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.
-
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.
-
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.
- In Inbound Rules, check rules for:
-
Remove app exceptions you no longer want
- Press
Windows + R, typecontrol, and pressEnter. - 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.
- Press
-
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.
Fix this automatically with Kudu
Run a free system scan to detect and resolve this issue automatically — no manual steps required.
Download Kudu Free →Related guides
How to Block Outbound App Connections with Windows Firewall
Stop unknown apps from calling home by creating outbound firewall rules, and let Kudu help identify suspicious software.
How to Block Office Macros from Internet Documents on Windows
Stop macro-based malware from running in downloaded Office files, and use Kudu to help strengthen Windows defenses.
How to Block Camera Access on Windows Globally and Per App
Protect your privacy by disabling webcam access system-wide or for specific apps, with Kudu helping review permissions.
How to Block Location Access on Windows Globally and Per App
Prevent apps and Windows services from using your location data, with Kudu helping you lock down device privacy.