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?

  • When I add a block everything rule to my server's firewall via remote desktop then the remote desktop connection immediately stops working :) – user764754 Dec 1 '16 at 15:42

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.