Applies ToSecurity Windows 10 Microsoft Defender

There are two ways to allow an app through Windows Defender Firewall. Both of them are risky:

  • Add an app to the list of allowed apps (less risky).

  • Open a port (more risky).

When you open a port in Windows Defender Firewall you allow traffic into or out of your device, as though you drilled a hole in the firewall. This makes your device less secure and might create opportunities for hackers or malware to use one of those openings to get to your files or use your device to spread malware to other devices.

Generally, it's safer to add an app to the list of allowed apps than to open a port. A port stays open until you close it, but an allowed app opens the "hole" only when needed.

To help reduce your security risk:

  • Only allow an app or open a port when you really need to, and follow the steps to remove apps from the list of allowed apps or close ports that you no longer need.

  • Never allow an app that you don't recognize to communicate through the firewall.

  1. Select the Start  menu, type Allow an app through Windows Firewall, and select it from the list of results.

  2. Select Change settings. You might be asked for an administrator password or to confirm your choice.

  3. To add an app, select the check box next to the app, or select Allow another app and enter the path for the app.

  4. To remove an app, clear the check box next to the app, and then select OK.

  1. Select the Start  menu, type Windows Defender Firewall, and select it from the list of results.

  2. Select Advanced settings on the side navigation menu. You might be asked for an administrator password or to confirm your choice.

  3. Select Inbound Rules.

  4. To open a port, under Actions, select New Rule... and complete the instructions.

  5. To close a port, select the rule you want to disable, and then under Actions, select Disable Rule.

See also

Check the firewall settings

Firewall & network protection in Windows Security

Precisa de mais ajuda?

Quer mais opções?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.