Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Mar 2017 11:16:55 +0200
From:      Ralf Mardorf <ralf.mardorf@rocketmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Two pf questions
Message-ID:  <20170328111655.121ede18@archlinux.localdomain>
In-Reply-To: <CALfReyfFyj9Gh1Yy%2BzxWH1kAgq%2BkVAGPpjG92keGWAaoMLNSQg@mail.gmail.com>
References:  <CAPORhP4JA_Jak7fL8Ko7wwoxGob=qLDzPLxtTgekoumqQJEGmA@mail.gmail.com> <20170327170941.59c84eec@archlinux.localdomain> <20170327171959.405bbfbb@archlinux.localdomain> <CALfReyfFyj9Gh1Yy%2BzxWH1kAgq%2BkVAGPpjG92keGWAaoMLNSQg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 28 Mar 2017 09:47:30 +0100, krad wrote:
>> On Mon, 27 Mar 2017 17:09:41 +0200, Ralf Mardorf wrote:  
>> >cp /etc/pf/bruteforce /tmp/foobar.txt
>> >pfctl -t bruteforce -T show >> /tmp/foobar.txt
>> >sort -u /tmp/foobar.txt > /etc/pf/bruteforce
>
>The problem probably is that you are appending to you file not
>overwriting it. So drop the double >
>ie
>
>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

If so, the above example with "sort -u" still might be good. Perhaps
in addition within a loop until the exit status $? of the last command
is 0, to ensure that /etc/pf/bruteforcen doesn't get lost, if something
should went wrong.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170328111655.121ede18>