Two pf questions
Ralf Mardorf
ralf.mardorf at rocketmail.com
Tue Mar 28 09:35:10 UTC 2017
On Tue, 28 Mar 2017 11:19:59 +0200, Ralf Mardorf via freebsd-questions
wrote:
>cp /etc/pf/bruteforce /tmp/foobar.txt
>pfctl -t bruteforce -T show >> /tmp/foobar.txt
>sort -u /tmp/foobar.txt > /etc/pf/bruteforce
>
>^
>^
>
>>If so, the above example with "sort -u" still might be good. Perhaps
> ^^^^^^^^^^^^^
> ^^^^^^^^^^^^^ the above with the cp to a backup file
>
>>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.
More clear, something similar to this:
cp /etc/pf/bruteforce /tmp/foobar.txt && \
pfctl -t bruteforce -T show >> /tmp/foobar.txt && \
some_loop
sort -u /tmp/foobar.txt > /etc/pf/bruteforce
check_exit_status
some_loop
More information about the freebsd-questions
mailing list