Skip to content

Instantly share code, notes, and snippets.

@thomsh
Last active April 16, 2023 21:11
Show Gist options
  • Save thomsh/2dd9d39446b69265b9d5da1cc6f50aff to your computer and use it in GitHub Desktop.
Save thomsh/2dd9d39446b69265b9d5da1cc6f50aff to your computer and use it in GitHub Desktop.
unbound install named.cache / root.hints [unchecked]
#!/bin/bash
# [unchecked] !
set -euxo pipefail
gpg --recv-keys 0x937BB869E3A238C5 --keyserver keys.gnupg.net || gpg --recv-keys 0x937BB869E3A238C5 --keyserver pgp.mit.edu
gpg --with-fingerprint -k 0x937BB869E3A238C5 |grep -B 1 'F0CB 1A32 6BDF 3F3E FA3A 01FA 937B B869 E3A2 38C5'
wget https://www.internic.net/domain/named.cache.sig -O /tmp/named.cache.sig
wget https://www.internic.net/domain/named.cache -O /tmp/named.cache
cd /tmp/ && gpg --with-fingerprint --verify named.cache.sig
install -m 0644 /tmp/named.cache /var/lib/unbound/root.hints
echo installed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment