Skip to content

Instantly share code, notes, and snippets.

@ZaphodB
ZaphodB / blocklist.service
Last active August 19, 2025 15:10
This takes https://www.blocklist.de/en/export.html IPs and puts them in ipsets that can be used for firewalling with netfilter/iptables edit: nftables versions added - remove suffix on service
[Unit]
Description=update ipsets from blocklist.de
Wants=network-online.target
After=network-online.target
ConditionACPower=true
[Service]
Type=oneshot
# Lower CPU and I/O priority.
#!/bin/bash
S=`/usr/bin/pdns_control --socket-dir=/run/pdns show security-status`
if [ "$S" == "0" ]
then
echo "NXDOMAIN or resolution failure for security-status"
exit 3
elif [ "$S" == "1" ]
then
echo "OK security-status received"
exit 0

Keybase proof

I hereby claim:

  • I am ZaphodB on github.
  • I am zaphodb (https://keybase.io/zaphodb) on keybase.
  • I have a public key whose fingerprint is 26A7 B463 AD63 C01A B4D5 8EC0 07D8 4B24 F58E FBE7

To claim this, I am signing this object:

#!/bin/bash
S=`/usr/bin/pdns_control show security-status`
if [ "$S" == "0" ]
then
echo "NXDOMAIN or resolution failure for security-status"
exit 3
elif [ "$S" == "1" ]
then
echo "OK security-status received"
exit 0