Use the Windows firewall properly, create and review rules, check open ports and decide if a free add on is worth installing.
A firewall is one of those protections that most people never think about until something goes wrong. It stands between your computer and the network, deciding which connections are allowed in and which programs may send data out.
Windows includes a capable firewall that is turned on by default. Many users install extra software without knowing whether they need it, or they turn the firewall off to fix a problem and forget to turn it back on.
This guide explains how the Windows firewall works, how to use it properly, when a free add on makes sense and how to avoid the common mistakes.

What a firewall does
A firewall filters network traffic using rules. Each rule decides whether a connection is allowed or blocked, based on the program, the port, the direction and the type of network.
Think of it as a security guard at a building entrance. Visitors who were invited, such as replies to your own requests, may enter. Strangers who try to open random doors are turned away.
It does not remove viruses already on your computer, so it works together with antivirus software, updates and careful habits.
Windows Defender Firewall
The firewall in Windows is called Windows Defender Firewall. It is part of Windows Security, and it works automatically in the background.
By default, it blocks unsolicited inbound connections and allows outbound ones. When a program asks to receive connections, Windows shows a prompt and lets you allow it on private or public networks.
For most home users, the default setup gives good protection without any extra work.
Network profiles
Windows has network profiles that set how strict the firewall is. A private network is a place you trust, such as your home. A public network is an airport, a cafe or any unknown connection.
Public mode is stricter and blocks discovery and file sharing. Always set unknown networks to public. If you are not sure, open Settings, then Network and internet, choose the connection and select the profile.
Domain profiles apply in company networks managed by an administrator.
Check that the firewall is on
Open Windows Security and choose Firewall and network protection. You should see all three profiles listed as active.
If one shows as off, click it and turn it on. A third party security suite may manage the firewall instead, in which case Windows shows that another program is in control.
Make this check part of your monthly routine, together with updates and backups.
Understand inbound and outbound rules
Inbound rules control what can connect to your computer. Outbound rules control what your programs can connect to.
Open Windows Defender Firewall with Advanced Security from the Start menu to see all rules. You will find hundreds of entries for Windows features and installed programs. Most should be left alone.
Only add or change rules when you know exactly why you need them, and note what you changed.
Create an inbound rule step by step
Sometimes a program, such as a game server or a file transfer tool, needs an inbound connection. In the advanced firewall window, choose Inbound Rules, then New Rule.
Select Program or Port, choose the program path or the port number and protocol, and select Allow the connection. Choose the network profiles, usually private only, and give the rule a clear name.
Keep the rule as narrow as possible. Avoid allowing all programs or a wide range of ports.
Block a program from the internet
You can stop a program from sending data by creating an outbound rule. Choose Outbound Rules, then New Rule, select Program and browse to the executable file.
Then choose Block the connection and apply it to all profiles. This is useful for old software that you must keep but do not want connecting to the internet.
Test the program afterwards. If something stops working, disable the rule and check which function needs the connection.
Turn on logging
The firewall can record blocked connections. In the advanced window, open Properties, choose a profile and select Customize under Logging.
Set the option to log dropped packets and note the file location, which is a text file in the Windows system folder. The log shows when and where blocked connections came from.
Use it for troubleshooting, not for constant monitoring. The file can grow large, so turn logging off after you finish.
Find open ports and listening programs
Programs listen on ports to receive connections. To see which ones are active, open Command Prompt as administrator and run netstat with the a, n and o switches.
The output lists local addresses, ports and the process identifier. Match the identifier to a program in Task Manager. Resource Monitor shows the same information in a friendlier form on its Network tab.
If you find an unknown program listening on a port, investigate it before you decide whether to remove it.
Your router is a firewall too
Your home router blocks unsolicited connections from the internet through a feature called network address translation. This is a strong first layer of protection.
Be careful with port forwarding, which opens a path to a specific computer. Forward only ports you really need, and only to devices you keep updated.
Also disable features that expose your network without a good reason, and change the default router password.
Free add on firewalls
Some free tools build on the Windows filtering platform. simplewall is an open source program that gives detailed control over which applications may connect. TinyWall is a free tool that makes the Windows firewall easier to manage.
They suit users who want to approve each program. They take more attention, and they can block updates or system functions if misconfigured.
Use only one firewall manager at a time, and download it from the official project page. Our guide to free antivirus software for Windows 10 explains how to pair a firewall with real time protection.
Do you need a third party firewall
For most people, the answer is no. The Windows firewall, a router and updated software protect well against common attacks.
An extra firewall makes sense if you want to see and control outbound connections, if you use risky software or if you manage a more complex network.
Do not install a paid suite just for the firewall. The built in one is mature, and many commercial suites rely on it.
Games and apps that need ports
Many games use a technology called UPnP to open ports automatically on the router. This is convenient but can expose your network if software misbehaves.
If a game says that a port is closed, first check the game's support page. It will list the ports you need. Add only those ports for that program, and keep the rule limited to private networks.
Avoid disabling the firewall for gaming. It is rarely the cause of lag.
Remote access and file sharing
Services such as Remote Desktop and file sharing are common targets. Do not expose them directly to the internet.
Our guide to free remote desktop software for PC explains how to connect safely. For file sharing, use strong passwords, private networks only and the latest updates.
Disable features that you do not use, such as old SMB versions and network discovery on public networks.
Public Wi Fi settings
When you connect to a cafe or hotel network, make sure Windows treats it as public. This blocks sharing and discovery, and the firewall becomes stricter.
Avoid sensitive tasks on open networks, or use a trustworthy VPN. Turn off automatic connection to open networks.
After you leave, forget the network in Wi Fi settings.

Mistakes to avoid
Many security problems are self inflicted.
- Turning the firewall off to test an app and forgetting to turn it back on.
- Allowing a program on public networks without a reason.
- Running two firewall managers at the same time.
- Opening router ports and forgetting about them.
- Ignoring warnings from unknown programs.
If something does not work, find the specific rule needed instead of disabling protection.
Reset to defaults
If your rules have become a mess, you can restore the defaults. In the advanced firewall window, choose Restore Default Policy. You can also run the netsh advfirewall reset command in an administrator Command Prompt.
This removes your custom rules, so note them first. Programs will ask for permission again when they need it.
A reset is a good way to clean up after experiments.
Review rules every quarter
Firewall rules accumulate quietly. Every few months, open the advanced firewall window and sort inbound rules by name or by enabled state. Look for rules created by programs you have removed, and for broad rules that allow any program or any port.
Disable rather than delete when you are unsure, and watch for problems over a week. If nothing breaks, you can remove the rule. This light housekeeping keeps your protection simple and avoids dangerous forgotten exceptions.
Understand common firewall alerts
When Windows asks whether to allow a program through the firewall, read the prompt calmly. Check the program name, the publisher and the network type. If you just opened a game or a media server, allowing private networks is normal.
If you did not start anything, or the name is unfamiliar, click Cancel and investigate. A prompt that appears for a program you do not recognise can be an early sign of unwanted software. Never click Allow on public networks unless you have a clear reason.
A short home network security checklist
Protecting your computer also means protecting the network around it. Change the default router password and the Wi Fi password, use WPA2 or WPA3 encryption and keep the router firmware updated.
Disable features you do not use, such as remote administration and unused guest networks. Give smart devices a separate guest network if the router supports it. Check the list of connected devices occasionally, and remove any you do not recognise.
Firewall habits for laptops that travel
A laptop moves between networks, so its firewall matters even more. Make sure every new network is set to public, and check that file sharing and network discovery stay off on those networks.
Install updates before you travel, because hotel and airport networks are not a good place to download large patches. Use a trusted VPN on open networks, and log out of sensitive accounts when you finish. These habits reduce the chance that a stranger on the same network reaches your computer.
Test your firewall configuration
After you change rules, check that the result is what you expect. Test the program that needed the rule and confirm it works on the right network. Then look at the list of listening ports with netstat or Resource Monitor and make sure nothing unexpected appears.
You can also use a reputable online port scanner from outside your network to see which ports your router exposes. Run it only against your own connection, and close anything you do not recognise. Testing after every change turns a firewall from a guess into something you can trust.
Keep a copy of your rules
Before you make large changes, export your firewall policy from the advanced window and save the file with your other backups. If something breaks, you can import it and return to a known good setup in a minute.
Keep reading in this series
This guide belongs to our free PC software series. For the big picture, start with the complete guide to the best free PC software for Windows 11.
These related guides continue the topic:
- free antivirus software for Windows 10: protection options and settings after Windows 10 support ended.
- free PC password manager software: store and protect your passwords for free.
- free remote desktop software for PC: connect to another computer securely.
Final thoughts
The Windows firewall is good, free and already running. Keep it on, treat unknown networks as public and add rules only when you know why.
Use a simple add on only if you want more control, and never disable the firewall as a quick fix. Combined with updates, antivirus and strong passwords, it keeps your computer well protected.
FAQ
Do I need a third party firewall for Windows?
Most people do not. Windows Defender Firewall, a router and updated software provide strong protection. An extra tool is only for users who want detailed control.
Is it safe to turn off the Windows firewall?
It is not recommended. If an app does not work, create a specific rule instead of disabling the firewall.
How do I block a program from the internet?
Create an outbound rule in Windows Defender Firewall with Advanced Security, select the program and choose Block the connection.
What are the best free firewall tools?
The built in Windows firewall is the best starting point. simplewall and TinyWall are free tools that help manage it.
Should my home network be public or private?
Use private only for networks you trust. Treat cafes, airports and hotels as public.
firewall, software, free, full, version




