Do new Windows firewall rules affect currently open connections?

If I added a rule to windows firewall that blocked an ip or port currently used by an open connection, does that rule take effect immediately or only after the connection were closed?

I.e, If I have an open ssh session and then block port 22, would that terminate my ssh session, block the traffic on the connection but leave the session open, or only block future ssh connection attempts?


Changing firewall rules will definitely affect open connections. Rules take effect immediately, and the firewall will prevent any more traffic going through closed ports.


These are older articles, but they have some basic information about the Windows Firewall:

Understanding Firewall Rules | Microsoft Docs

How Windows Firewall Works | Microsoft TechNet