Allowing a program through windows firewall

生来就可爱ヽ(ⅴ<●) 提交于 2020-05-28 07:26:09

问题


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

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.


回答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).




回答2:


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




回答3:


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!



来源:https://stackoverflow.com/questions/36646093/allowing-a-program-through-windows-firewall

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!