Before installing djbdns, you need to install the required dependencies. Run the following command:
sudo apt-get install daemontools daemontools-run ucspi-tcp ucspi-proxy
sudo mkdir /usr/local/src/djbdns
cd /usr/local/src/djbdns
sudo wget -O djbdns.tar.gz http://cr.yp.to/djbdns/djbdns-1.05.tar.gz
sudo tar -zxvf djbdns.tar.gz
cd djbdns-1.05
sudo make setup check
root
in the /var/lib/dnscache
directory:sudo mkdir /var/lib/dnscache
sudo touch /var/lib/dnscache/root
/etc/dnscache
directory and its subdirectories:sudo mkdir -p /etc/dnscache/log/main
sudo mkdir -p /etc/dnscache/env
sudo mkdir -p /etc/dnscache/root/servers
servers
in the /etc/dnscache/root
directory and add the following line to it:127.0.0.1
/etc/dnscache/env/IP
file and add the IP address of the primary DNS server you want to use:echo "1.2.3.4" | sudo tee /etc/dnscache/env/IP
/etc/dnscache/env/FORWARDONLY
file and add the following line to it:1
/etc/dnscache/env/CACHESIZE
file and add the maximum amount of memory, in bytes, that you want dnscache to use for caching queries. For example:echo "100000" | sudo tee /etc/dnscache/env/CACHESIZE
sudo svscan /service
sudo update-service add /service/dnscache
sudo update-service add /service/tinydns
You have successfully installed and configured djbdns on your Ubuntu server. You can now use it as your primary DNS server.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!