Date: Tue, 28 Mar 2017 11:35:01 +0200 From: Ralf Mardorf <ralf.mardorf@rocketmail.com> To: freebsd-questions@freebsd.org Subject: Re: Two pf questions Message-ID: <20170328113501.2a5ebf60@archlinux.localdomain> In-Reply-To: <20170328111959.400d4761@archlinux.localdomain> References: <CAPORhP4JA_Jak7fL8Ko7wwoxGob=qLDzPLxtTgekoumqQJEGmA@mail.gmail.com> <20170327170941.59c84eec@archlinux.localdomain> <20170327171959.405bbfbb@archlinux.localdomain> <CALfReyfFyj9Gh1Yy%2BzxWH1kAgq%2BkVAGPpjG92keGWAaoMLNSQg@mail.gmail.com> <20170328111655.121ede18@archlinux.localdomain> <20170328111959.400d4761@archlinux.localdomain>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170328113501.2a5ebf60>