Serve custom A and PTR records for a local network
masterYou can use Unbound to resolve custom local names (e.g., laptop.local) by providing an a-records.conf file. This file supports both A records (forward resolution) and PTR records (reverse resolution).
Example a-records.conf format:
# A Record
local-data: "laptop.local. A 192.168.1.2"
# PTR Record
local-data-ptr: "192.168.1.2 laptop.local."Mount this file to /opt/unbound/etc/unbound/a-records.conf when starting the container.
docker run \
--name=unbound-rpi \
--volume=$(pwd)/a-records.conf:/opt/unbound/etc/unbound/a-records.conf:ro \
--publish=53:53/udp \
--publish=53:53/tcp \
--restart=unless-stopped \
--detach=true \
mvance/unbound-rpi:latest