Packer template to build a simple Raspberry Pi DNS server running dnsmasq. Base OS is Raspbian Lite.
Features:
- dnsmasq with decent defaults
- Preconfigured SSH key login, password auth is disabled
- dnsutils installed for local debugging
- Uses arm-image Packer builder, can be built on non-ARM architectures.
Prerequisites: Docker is running, you have a SSH public key at ~/.ssh/id_rsa.pub
.
- Clone solo-io/packer-builder-arm-image and run
docker build -t packer-builder-arm .
there to get the image locally - Run
./build.sh
in this repo. It will mount~/.ssh/id_rsa.pub
from your local filesystem inside Docker and configure it in the built image. - Flash
output-arm-image/image
to a MicroSD card and boot your Pi. - ssh in as user
pi
, edit/etc/hosts
to add local DNS records.
kpartx sometimes fails with the following error message. It's a race condition somewhere, just try again and it will work.
==> arm-image: error kaprts -l exit status 1: mount: could not find any device /dev/loop#Bad address
==> arm-image: can't set up loop
==> arm-image:
Build 'arm-image' errored: step canceled or halted
- Firewall config
- DNS-over-TLS with stubby + 9.9.9.9