pickdns — an obsolete special-purpose content DNS server using the UDP protocol
pickdns is a content DNS server that speaks the DNS/UDP protocol. It accepts DNS queries from hosts around the Internet, and responds with locally configured information.
When it starts pickdns changes its root to the directory specified by the
ROOT environment variable, and drops privileges to run as the user ID and group ID specified by the
GID environment variables.
The latter can be set up with envuidgid(1).
Normally pickdns is run via a server program such as udp-socket-listen to listen for DNS/UDP queries from hosts around the Internet.
It understands the
LISTEN_FDS environment variable convention for having an already-listening socket passed to it by such a program, and uses the last open file descriptor in the list that refers to a UDP/IPv4 socket.
If no such open file descriptor is provided it falls back to opening its own UDP/IPv4 socket, bound to port 53 of the IP address given by the value of the
IP environment variable.
It does not handle DNS/TCP.
pickdns rejects zone-transfer requests, inverse queries, non-Internet-class queries, truncated packets, and packets that contain anything other than a single query.
pickdns answers queries as specified by
data.cdb, a binary file in its root directory created by pickdns-data(1).
It only answers A and AAAA queries.
It finds all of the A or AAAA resource records in the database for the relevant domain name, orders them in a random order, and returns up to the first 3 of them in the response.
All resource records are given a 5 second TTL.