Two pf questions

krad kraduk at
Tue Mar 28 08:47:31 UTC 2017

I didnt think you could get duplicate addresses in pf tables, so please
clarify if you are or not. (i suspect not)
The problem probably is that you are appending to you file not overwriting
it. So drop the double >

pfctl -t bruteforce -T show | sort -u > /etc/pf/bruteforce

This will obviously loose the old contents of the file which you might not
want, however you could just make sure you loaded the contents of the file
into the table before you dump it

On 27 March 2017 at 16:19, Ralf Mardorf via freebsd-questions <
freebsd-questions at> wrote:

> On Mon, 27 Mar 2017 17:09:41 +0200, Ralf Mardorf wrote:
> >On Mon, 27 Mar 2017 10:37:49 -0400, David Mehler wrote:
> >>pfctl -t bruteforce -T show >> /etc/pf/bruteforce
> >>
> >>the problem is that I'm getting duplic addresses. The table has
> >>fifteen addresses in memory but 75 in the table there's no unique
> >>sorting, any ideas on how? I only want unique IP's in the on disk
> >>table to avoid redundant addresses
> >
> >cp /etc/pf/bruteforce /tmp/foobar.txt
> >pfctl -t bruteforce -T show >> /tmp/foobar.txt
> >sort -u /tmp/foobar.txt > /etc/pf/bruteforce
> PS: I don't know how your tools work, so perhaps you only need to pipe
> the "new", assuming the tools shouldn't provide their own options to do
> the same ;).
> pfctl -t bruteforce -T show | sort -u >> /etc/pf/bruteforce
> _______________________________________________
> freebsd-questions at mailing list
> To unsubscribe, send any mail to "freebsd-questions-
> unsubscribe at"

More information about the freebsd-questions mailing list