Reset states from Cron?
-
Hey Guys,
Found this http://forum.pfsense.org/index.php/topic,45417.0.html
on how to reset states, but the last entry in the thread - I simply cannot make this work.
I only want to reset states on one vlan with```
/sbin/pfctl -F all -i bce1_vlan20Tried with -K and vlan net, but nogo there... Or is it not possible to reset states on vlan only? Please advice - TIA! /Gulkings
-
use -k and specify the subnet.
like:
pfctl -k x.x.x.x/24 ; pfctl -k 0.0.0.0/0 -k x.x.x.x/24
That will kill all states to and from x.x.x.x/24
-
Thanks,
I believe I've tried that already, however only with one subnet.
Used -k 192.168.1.0/24 instead of -i interface.Do I have to use to->from subnet or should -k subnet work ?
-
Do it exactly as I put in above, or otherwise you'd only kill half the states.
-
Understood.
Just tried:
/sbin/pfctl -F all -k 192.168.1.1/24
from commandline sitting on adminnet (172.16.0.1), but it kills everything - just lost connection to both server and pfsense?
-
Don't use -F all, use the exact syntax I showed, just change the IPs.
-
Thanks, you're a saviour ;D!
/sbin/pfctl -k 192.168.1.1/24 ; pfctl -k 0.0.0.0/0 -k 192.168.1.0/24
seems to do the trick! Any idea how soon that subnet will be able to start connections again after that reset?
/G
-
Immediately.