Skip to content

Configuration Path

CentOS: /etc/dnsdist/dnsdist.conf
Alpine: /etc/dnsdnist.conf

Set ACL

addACL('0.0.0.0/0')
addACL('::/0')

Modify Bind IP

Set bind IP

setLocal('0.0.0.0:53')

Add another entry

addLocal('[::]:53')

Set Downstream Servers

newServer({address="127.0.0.1:5353"})
newServer({address="4.57.5.3:53"})

Specify which IP/interface is used to reach the downstream server.

newServer({address="192.0.2.1", source="192.0.2.127"})
newServer({address="192.0.2.1", source="eth1"})
newServer({address="192.0.2.1", source="192.0.2.127@eth1"})

Downstream server with pool definition, in this example for abuse queries. Requests for bad-domain1.example and bad-domain2.example are routed there.

newServer({address="192.0.2.3", pool="abuse"})
addAction({'bad-domain1.example', 'bad-domain2.example.'}, PoolAction("abuse"))

More information about pools

Show Downstream Servers

showServers()

Modify Downstream Servers

Take a downstream server down

getServer(0):setDown()

Bring a downstream server up

getServer():setUp()

Set queries per second for downstream server 0 to 1000

getServer(0):setQPS(1000)

Caching

Example with a buffer for 10,000 entries.

pc = newPacketCache(10000, {maxTTL=86400, minTTL=0, temporaryFailureTTL=60, staleTTL=60, dontAge=false})
getPool(""):setCache(pc)