stv (steve) - tool to parse pfctl output, helps troubleshooting rules & states
-
In case it helps anyone, I made a small tool called
stv
that outputs rule / state information in a format that, at least for me, is useful for troubleshooting.You might be wondering, How is this different from
pftop
?Well, pftop is mildly broken at the moment, for one. see forum thread.
Other than that, stv offers more ways to filter states, and displays (imo) better detail such as the actual rule name (not just an ID) and the interface a state belongs to, plus the state's ID which can be used for killing individual states. Also, stv allows you to filter using regex/wildcard patterns so you can do things like "show me all the states on ix3 that are using port 3389 or 5901" which in stv would be
stv '%ix3%.*:(3389|5001) '
If you have any suggestions or feedback please let me know.