Defender Firewall and Python

Anonymous
2021-07-12T16:54:03+00:00

Python natively creates new folders within its own folder structure and recreates new python.exe files. When these new files are run, it requests access through the firewall. Is there a way to blanket a folder and subfolders to allow in the firewall without requesting access every time python recreates a new instance of itself?

Windows for home | Windows 10 | Security and privacy

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Reza-Ameri 45,671 Reputation points Volunteer Moderator
    2021-07-12T17:07:27+00:00

    I believe this permission request is being asked from the Python and you may set it do not ask for permission next time.

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2021-07-12T17:16:16+00:00

    As shown below it is the firewall that keeps requesting. Each python.exe file is a new instance created within the same folder structure. Is there a way to blanket that file and or directory from requesting access to the firewall over and over?

    1 person found this answer helpful.
    0 comments No comments
  3. Reza-Ameri 45,671 Reputation points Volunteer Moderator
    2021-07-13T16:38:31+00:00

    You could only add application and not folder to the Windows Firewall.

    You may try open the Windows Defender Firewall with Advanced Security and create a new rule and allow application with name python.exe and allow outbound and inbound connection (depending on your requirements) and see if it works.

    1 person found this answer helpful.
    0 comments No comments