9

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?

theeddieh
  • 193
  • 1
  • 1
  • 4
  • 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 01 '16 at 15:42

1 Answers1

7

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

JonathanDavidArndt
  • 1,414
  • 3
  • 20
  • 29