How to install dqcache
dqcache, a recursive DNS resolver that supports DNSCurve, is very easy to compile, install and run.
Binary packages
Binary packages are available for Debian, FreeBSD, and perhaps other systems.
Build and install dqcache
wget https://github.com/janmojzis/dq/archive/refs/tags/20240101.tar.gz
(SHA256: a86b697e4c23568d9aacc93dea8cfaae0d889dfb22509e0491f9de3d80adf9c3)
wget https://github.com/janmojzis/dq/releases/download/20240101/20240101.tar.gz.asc
gpg --verify 20240101.tar.gz.asc 20240101.tar.gz
gunzip < 20240101.tar.gz | tar -xf -
cd dq-20240101
make
make install
Alternatively, dqcache is available from github:
git clone https://github.com/janmojzis/dq.git
cd dq
make
make install
Configure dqcache
#under root - create dqcache root directory
mkdir -p /var/dqcache/root/servers /var/dqcache/env
echo 10000000 > /var/dqcache/env/CACHESIZE
echo 127.0.0.1 > /var/dqcache/env/IP
echo "/var/dqcache/root" > /var/dqcache/env/ROOT
#under root - setup dqcache root servers
sh -c '(
echo "192.112.36.4"
echo "192.203.230.10"
echo "192.33.4.12"
echo "192.36.148.17"
echo "192.5.5.241"
echo "192.58.128.30"
echo "193.0.14.129"
echo "198.41.0.4"
echo "198.97.190.53"
echo "199.7.83.42"
echo "199.7.91.13"
echo "199.9.14.201"
echo "202.12.27.33"
echo "2001:500:12::d0d"
echo "2001:500:1::53"
echo "2001:500:200::b"
echo "2001:500:2::c"
echo "2001:500:2d::d"
echo "2001:500:2f::f"
echo "2001:500:9f::42"
echo "2001:500:a8::e"
echo "2001:503:ba3e::2:30"
echo "2001:503:c27::2:30"
echo "2001:7fd::1"
echo "2001:7fe::53"
echo "2001:dc3::35"
) > /var/dqcache/root/servers/@'
#under root - create dqcache user
useradd dqcache
Run dqcache
envuidgid dqcache envdir /var/dqcache/env dqcache
Run dqcache under daemontools
Here's a run file for dqcache, under daemontools:
exec 2>&1
exec envuidgid dqcache envdir /var/dqcache/env dqcache
Here's a run file for logging, under the user dqcachelog:
#exec setuidgid dqcachelog multilog t ./main
exec setuidgid dqcachelog multilog t '-*' '+* tx*+*' ./main
I personally don't want to log every query. The above just logs DNSCurve queries.