Allowing a program through windows firewall

12,022

Solution 1

After a lot of research and investigation, I found that inbound rules, are applicable, in scenarios, when a program want to open a server socket for listening connections from other nodes on the same network or from different network. Outbound connections are applicable in scenarios, when a program want to connect to other computer on the same network or on other network(as a client).

Solution 2

You can easily enable for python just follow the steps:

  1. Go to windows settings
  2. Then go to update and security-> firewall and network protection-> Allow an app through firewall
  3. Then click on change settings
  4. Search for python and tick mark both(private and public)

You should be alright to go!

Solution 3

ad.1) +1 for mister Mark, but to be more precise - normally "internet" as u called falls into - public networks -> it's not secure / cannot be trusted therefore security level differentiate for both. "behind" the scenes for example, if you are trying to reach page which is in local area network (private network) then it's trusted therefore for example cookies might be accepted by default, or scripts executed.

ad.2) not enough text field:D

ad.3) that is normally configurable within "Windows Firewall with Advanced Security" you can then specify port-s range/application/system level

Share:
12,022
Mangu Singh Rajpurohit
Author by

Mangu Singh Rajpurohit

Enthusiastic Software Engineer.

Updated on June 06, 2022

Comments

  • Mangu Singh Rajpurohit
    Mangu Singh Rajpurohit almost 2 years

    I am new to windows Firewall. I have seen this dialog and unable to relate the meaning of it.enter image description here

    The above dialog says that "Allow python to communicate on these networks:". It then gives two checkboxes, one for each Private network and one for Public network.

    So, my questions are :- 1) What is the difference between Private network and public network ? Which network out of these, does internet belongs to ?

    2) what is the meaning of allowing a program to communicate on given network ? Let's take it from both Client as well as Server perspective. A program(acting as client), when allowed through firewall on a given network(public/private), does it mean that it can establish socket connection with other computers within the same network ? A program(acting as server), when allowed through firewall, does it mean that it can accept socket connections from other computers within the same network ?

    3) How can I control a program to either listen for connections OR to establish connections ? By that I mean, How can I control that any python program(python.exe) must not be allowed to listen for connections ?

    Thanks in advance.