Skip to content

Instantly share code, notes, and snippets.

@ZaphodB
ZaphodB / blocklist.service
Last active July 12, 2023 08:34
This takes https://www.blocklist.de/en/export.html IPs and puts them in ipsets that can be used for firewalling with netfilter/iptables
[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
➜ doh git:(master) ✗ ./doh www.in-berlin.de https://dns2.in-berlin.de:443/
www.in-berlin.de from https://dns2.in-berlin.de:443/
TTL: 900 seconds
A: 130.133.8.34
AAAA: 2001:0bf0:c000:000a:0000:0000:0002:0226
➜ doh git:(master) ✗ ./doh -v www.in-berlin.de https://dns2.in-berlin.de:443/
== Info: Found bundle for host dns2.in-berlin.de: 0x7ffc3d601260 [serially]
== Info: Trying 2001:67c:1400:800:53::2...
== Info: TCP_NODELAY set
== Info: Hostname 'dns2.in-berlin.de' was found in DNS cache

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
@ZaphodB
ZaphodB / gist:5501545
Created May 2, 2013 11:11
homebrew ppl 1.0 compile error
HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install ppl
...
/bin/sh ../libtool --tag=CXX --mode=compile c++ -DHAVE_CONFIG_H -I. -I.. -I.. -I../src -g -O3 -fomit-frame-pointer -W -Wall -c -o assert.lo assert.cc
libtool: compile: c++ -DHAVE_CONFIG_H -I. -I.. -I.. -I../src -g -O3 -fomit-frame-pointer -W -Wall -c assert.cc -fno-common -DPIC -o .libs/assert.o
brew: superenv removed: -I../src -g -O3 -W -Wall
libtool: compile: c++ -DHAVE_CONFIG_H -I. -I.. -I.. -I../src -g -O3 -fomit-frame-pointer -W -Wall -c assert.cc -o assert.o >/dev/null 2>&1
/bin/sh ../libtool --tag=CXX --mode=compile c++ -DHAVE_CONFIG_H -I. -I.. -I.. -I../src -g -O3 -fomit-frame-pointer -W -Wall -c -o Box.lo Box.cc
libtool: compile: c++ -DHAVE_CONFIG_H -I. -I.. -I.. -I../src -g -O3 -fomit-frame-pointer -W -Wall -c Box.cc -fno-common -DPIC -o .libs/Box.o
brew: superenv removed: -I../src -g -O3 -W -Wall
In file included from Box.cc:25: