A firewall can help prevent hackers or malicious software (such as worms) from gaining access to your computer through a network or the Internet. A firewall can also help stop your computer from sending malicious software to other computers.
You can customize four settings for each type of network location in Windows Firewall. To find these settings, follow these steps:
Open Windows Firewall by clicking the Start button , and then clicking Control Panel. In the search box, type firewall, and then click Windows Firewall.
In the left pane, click Turn Windows Firewall on or off.
If you're prompted for an administrator password or confirmation, type the password or provide confirmation.
Here's what the settings do and when you should use them.
This setting is selected by default. When Windows Firewall is on, most programs are blocked from communicating through the firewall. If you want to allow a program to communicate through the firewall, you can add it to the list of allowed programs. For example, you might not be able to send photos in an instant message until you add the instant messaging program to the list of allowed programs. To add a program to the list, see Allow a program to communicate through Windows Firewall.
This setting blocks all unsolicited attempts to connect to your computer. Use this setting when you need maximum protection for your computer, such as when you connect to a public network in a hotel or airport, or when a computer worm is spreading over the Internet. With this setting, you aren't notified when Windows Firewall blocks programs, and programs in the list of allowed programs are ignored.
When you block all incoming connections, you can still view most webpages, send and receive e‑mail, and send and receive instant messages.
If you select this check box, Windows Firewall will inform you when it blocks a new program and give you the option of unblocking that program.
Avoid using this setting unless you have another firewall running on your computer. Turning off Windows Firewall might make your computer (and your network, if you have one) more vulnerable to damage from hackers and malicious software.
If some firewall settings are unavailable and your computer is connected to a domain, your system administrator might be controlling these settings through Group Policy.
To turn Windows Firewall on or off, see Turn Windows Firewall on or off.