Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 5
    if you block all traffic, then yes, it should block your existing connection too. (It should hang, not break, at least not immediately.) But e.g. with iptables on Linux, it's rather common to accept established connections early in the ruleset, and only do detailed checking on new connections. Commented Aug 7, 2022 at 18:38
  • 1
    pf looks to have something similar, by default, the man page says: "By default pf(4) filters packets statefully; the first time a packet matches a pass rule, a state entry is created; for subsequent packets the filter checks whether the packet matches any state. If it does, the packet is passed without evaluation of any rules." Commented Aug 7, 2022 at 18:39
  • Ah, the state does the trick. Thanks! Commented Aug 7, 2022 at 18:40
  • 1
    or clear all or some of the states with pfctl -F states or pfctl -k, I guess. (based on the pfctl man page and the docs). I don't really know about pf so I'm not sure I dare post this as an answer... Commented Aug 7, 2022 at 18:51