Docker image running tinydns and axfrdns as name server. Uses fefe's ipv6 patches
Name server in a docker container running tinydns and axfrdns. Uses a git repository to periodically pull and update the DNS data.
- GIT_DNSDATA: URL to pull the dns data from. See example data
- GIT_UPDATE_FREQUENCY: Delay in seconds between each DNS data update
Create base axfrdns_tcp file:
cat > axfrdns_tcp <<EOF
# sample line: 1.2.3.4:allow,AXFR="heaven.af.mil/3.2.1.in-addr.arpa"
127.0.0.1:allow
:allow,AXFR=""
EOF
docker run -d \
-e GIT_DNSDATA="https://github.com/andreasfaerber/docker-tinydns-exampledata.git" \
-e GIT_UPDATE_FREQUENCY=60 \
-v /docker-tinydns/axfrdns_tcp:/etc/axfrdns/tcp \
-p 53:53/udp -p 53:53/tcp \
--name tinydns_example \
afaerber/docker-tinydns
- Create a SSH key pair required to pull your DNS data (named ssh_key and ssh_key.pub here)
- Allow the repository to be pulled by that SSH key pair (read-only)
- Change the example GIT_DNSDATA URL to your DNS data repository
docker run -d \
-e GIT_DNSDATA="https://github.com/andreasfaerber/docker-tinydns-exampledata.git" \
-e GIT_UPDATE_FREQUENCY=60 \
-v /docker-tinydns/ssh_key:/root/.ssh/id_rsa \
-v /docker-tinydns/ssh_key.pub:/root/.ssh/id_rsa.pub \
-v /docker-tinydns/axfrdns_tcp:/etc/axfrdns/tcp \
-p 53:53/udp -p 53:53/tcp \
--name tinydns_example \
afaerber/docker-tinydns
dig @127.0.0.1 your.example mx