Getting Started

The executable dens-pdns-backend-cli is a remote backend to PowerDNS which facilitates propagating RRs stored in DeNS Query’s database to PowerDNS so traditional DNS resolvers are able to transitvely query the blockchain for RRs.

In the git repository, it is provided at the flake output dens-pdns-backend, so Nix users can enter a shell with the dens-pdns-backend-cli executable with the following command.

nix shell github:mlabs-haskell/DeNS#dens-pdns-backend

When dens-pdns-backend-cli executes, it needs the following environment variables set.

  1. SOCKET_PATH: the path of the Unix domain socket it will run on.

  2. Environment variables to connect to a PostgreSQL database with the DeNS Query database schema as described here.

Integration with PowerDNS

To integrate this with PowerDNS, one will most likely want a pdns.conf file as follows.

launch=remote
remote-connection-string=unix:path=/ipc/dens-pdns-backend/dens-pdns-backend.sock

zone-cache-refresh-interval=0

### Disable all forms of caching so it always hits the blockchain for the latest information

cache-ttl=0
negquery-cache-ttl=0
query-cache-ttl=0

Indeed, the path in the remote connection should be the SOCKET_PATH environment variable that dens-pdns-backend-cli listens on. This configuration also disables all forms of caching so PowerDNS will always ask the blockchain for the latest information of RRs.