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.
-
Select the Start menu, type Allow an app through Windows Firewall, and select it from the list of results.
-
Select Change settings. You might be asked for an administrator password or to confirm your choice.
-
To add an app, select the check box next to the app, or select Allow another app and enter the path for the app.
-
To remove an app, clear the check box next to the app, and then select OK.
-
Select the Start menu, type Windows Defender Firewall, and select it from the list of results.
-
Select Advanced settings on the side navigation menu. You might be asked for an administrator password or to confirm your choice.
-
Select Inbound Rules.
-
To open a port, under Actions, select New Rule... and complete the instructions.
-
To close a port, select the rule you want to disable, and then under Actions, select Disable Rule.