formatting script for pfctl -v -s rules

Patrick Lamaiziere patfbsd at davenulle.org
Tue Aug 27 11:25:28 UTC 2013


Le Mon, 26 Aug 2013 12:23:42 -0400,
"Mike." <the.lists at mgm51.com> a écrit :

Hello,
 
> I've written a quick script to format the output of pfctl -v -s rules
> into a one-line-per-rule format.  For me, this format is more useful.
> 
> The script and sample output are available here:
> 
> http://archive.mgm51.com/sources/pfstats.html
> 
> I use this script with FreeBSD 8.4 and 9.1

Thanks, I think my colleagues will like this.

The script does not work on OpenBSD 5.3 because cut(1) does not handle
the '-' file. I think it is not needed at all :

  sed s/"  *"/" "/g | \
  cut -d' ' -f3,5,7,11- | \

Regards,


More information about the freebsd-pf mailing list