Finally got around to updating my script to update my #OpenBSD #pf firewall with...

@pertho@bsd.cafe

Finally got around to updating my script to update my #OpenBSD #pf firewall with @JulianOliver 's fantastic parasites.txt. (Apologies if you've seen a bunch of HEAD requests from me, Julian!)

If anyone's interested:

#!/bin/ksh
set -euo pipefail

cd /home/pertho
ftp -TV scienceispoetry.net/files/para
sed -e '/^[^0-9]/d' parasites.txt | sed '/^$/d' | sed '$d' > parasites.new
doas /usr/bin/install -g wheel -m 0644 -o root /home/pertho/parasites.new /etc/parasites.txt
doas /sbin/pfctl -t parasites -T replace -f /etc/parasites.txt
[ -f /home/pertho/parasites.new ] && rm -f /home/pertho/parasites.new

Please, go easy on Julian's server. Don't blast it with requests. He's providing this for free. (Thank you!!!!)

I use my home directory because I need to store parasites.txt with its timestamps. OpenBSD's ftp (which does talk https) checks the timestamp to see if a newer one is available and only proceeds if there is a newer one.

/etc/doas.conf edited to allow the install and pfctl commands to run (just look in doas.conf(5) for details and use the args)