Sign inSign up

hybridadmin/pdns-auth

By hybridadmin

Updated 11 months ago

Image
0

1.7K

hybridadmin/pdns-auth repository overview

PowerDNS Authoritative Docker Image

Build Docker Pulls

What is PowerDNS Authoritative Nameserver ?

PowerDNS Authoritative Nameserver is a versatile nameserver which supports a large number of backends. These backends can either be plain zone files or be more dynamic in nature.

Usage

docker-compose
---
version: "3"
services:
  pdns-auth:
    image: hybridadmin/pdns-auth:latest
    container_name: pdns-auth-server
    hostname: pdns-auth-server #optional
    environment:
      - ALLOW_AXFR_IPS=127.0.0.0/8,::1 #optional
      - ALLOW_NOTIFY_FROM_IPS=0.0.0.0/0 #optional
      - ALLOW_WEB_ACCESS=yes #optional
      - WEBSERVER_PASSWORD=changemepass #optional
      - ALLOW_API_ACCESS=yes #optional
      - API_KEY=dfdfdfdf #optional
      - DISABLE_AXFR=yes #optional
      - DISABLE_SYSLOG=yes #optional
      - DNAME_PROCESSING=no #optional
      - EXPAND_ALIAS=no #optional
      - USE_GUARDIAN=no #optional
      - LOG_DNS_DETAILS=no #optional
      - LOG_DNS_QUERIES=no #optional
      - MAX_TCP_CONNECTION_DURATION=0 #optional
      - MAX_TCP_CONNECTIONS=20 #optional
      - QUERY_LOGGING=no #optional
      - RECEIVER_THREADS=2 #optional
      - RETRIEVAL_THREADS=2 #optional
      - SIGNING_THREADS=2 #optional
    ports:
      - 53:53/tcp
      - 53:53/udp
      - 8081:8081/tcp
    restart: always
docker cli

Run a container with default settings:

docker run --name pdns-auth -d -p 53:53/udp -p 53:53/tcp -p 8081:8081/tcp --restart=always hybridadmin/pdns-auth:latest

To run a container with customized settings:

docker run -d --name pdns-auth \
-e ALLOW_AXFR_IPS=127.0.0.0/8,::1 `#optional` \
-e ALLOW_NOTIFY_FROM_IPS=0.0.0.0/0 `#optional` \
-e ALLOW_WEB_ACCESS=yes `#optional` \
-e WEBSERVER_PASSWORD=changemepass `#optional` \
-e ALLOW_API_ACCESS=yes `#optional` \
-e API_KEY=dfdfdfdf `#optional` \
-e DISABLE_AXFR=yes `#optional` \
-e DISABLE_SYSLOG=yes `#optional` \
-e DNAME_PROCESSING=no `#optional` \
-e EXPAND_ALIAS=no `#optional` \
-e USE_GUARDIAN=no `#optional` \
-e LOG_DNS_DETAILS=no `#optional` \
-e LOG_DNS_QUERIES=no `#optional` \
-e MAX_TCP_CONNECTION_DURATION=0 `#optional` \
-e MAX_TCP_CONNECTIONS=20 `#optional` \
-e QUERY_LOGGING=no `#optional` \
-e RECEIVER_THREADS=2 `#optional` \
-e RETRIEVAL_THREADS=2 `#optional` \
-e SIGNING_THREADS=2 `#optional` \
-p 53:53/udp -p 53:53/tcp -p 8081:8081/tcp --restart=always hybridadmin/pdns-auth:latest

To add a dns zone from outside the container:

docker exec --tty --user pdns [container_id] env TERM=xterm pdnsutil create-zone example.com
docker exec --tty --user pdns [container_id] env TERM=xterm pdnsutil add-record example.com @ NS ns1.example.com
docker exec --tty --user pdns [container_id] env TERM=xterm pdnsutil add-record example.com @ NS ns2.example.com

Connect to the container:

docker exec -it [container_id] /bin/bash

Configuration Settings

By default, the settings below will be configured in /etc/powerdns/pdns.d/pdns.lmdb.confvia the script docker-entrypoint.sh inside the container.

Example pdns.lmdb.conf:

allow-axfr-ips=127.0.0.0/8,::1
allow-notify-from=0.0.0.0/0,::/0
api=yes
api-key=changemeapi
disable-axfr=yes
disable-syslog=yes
dname-processing=no
expand-alias=no
guardian=no
local-address=0.0.0.0
local-port=53
log-dns-details=no
log-dns-queries=no
setgid=pdns
setuid=pdns
loglevel=4
max-tcp-connection-duration=0
max-tcp-connections=20
query-logging=yes
receiver-threads=1
resolver=no
retrieval-threads=2
reuseport=yes
signing-threads=3
tcp-fast-open=0
version-string=Not-Supported
webserver=yes
webserver-address=0.0.0.0
webserver-allow-from=0.0.0.0/0
webserver-password=changemeweb
webserver-port=8081
launch=lmdb
lmdb-filename=/var/lib/powerdns/pdns.lmdb
lmdb-sync-mode=nometasync

Note: The configuration above uses the lmdb backend.

Additional settings from the official configuration documentation can be added as well if needed.

Environment Variables

VariableFunction
ALLOW_AXFR_IPSOnly these IP addresses or netmasks will be able to perform AXFR without TSIG
ALLOW_NOTIFY_FROM_IPSAllow AXFR NOTIFY from these IP ranges
ALLOW_WEB_ACCESSEnable a webserver for monitoring
WEBSERVER_PASSWORDThe plaintext password required for accessing the webserver
ALLOW_API_ACCESSEnable/disable the Built-in Webserver and HTTP API
API_KEYAPI key to be used for api calls to the server
DISABLE_AXFRDisallow zone transfers
DISABLE_SYSLOGLog only to stdout and not syslog
DNAME_PROCESSINGSynthesise CNAME records from DNAME records as required
EXPAND_ALIASAllow ALIAS records to be expanded
USE_GUARDIANRun within a guardian process
LOG_DNS_DETAILSSpecify whether DNS details will sent to syslog
LOG_DNS_QUERIESSpecify whether PowerDNS will log all incoming DNS queries
MAX_TCP_CONNECTION_DURATIONMaximum time in seconds that a TCP DNS connection is allowed to stay open
MAX_TCP_CONNECTIONSAmount of incoming TCP DNS connections allowed simultaneously
QUERY_LOGGINGHints to a backend that it should log a textual representation of queries it performs.
RECEIVER_THREADSNumber of listening threads to start
RETRIEVAL_THREADSNumber of AXFR slave threads to start
SIGNING_THREADSNumber of threads to be used for signing

Tag summary

Content type

Image

Digest

sha256:2d351135c

Size

64 MB

Last updated

11 months ago

docker pull hybridadmin/pdns-auth