DHCP

Installing a dhcp server was quite simple.

# apt-get install dhcp3-server

Then I just had to modify the /etc/dhcp/dhcpd.conf the configuration file did not changed almost at all from the previous versions so I could just copy it with very small modifications. The only interesting thing in this file is how to make a server boot from the network:

host X {  
#next-server X.X.X.1;  
#filename "/tftpboot/pxelinux.0";  
hardware ethernet XX:XX:XX:XX:XX:XX;  
fixed-address X.X.X.28;
}

Djbdns

The only requirement was to have an external forward dns cache. Sadly enough I could not use the djbdns-install package because most of the dependencies where already installed during http://www.len.ro/work/tools/gutsy-on-a-ubuntu-server/qmail install (daemontools and uscpi-tcp). I only had to follow the instructions from here.

# cd /downloads/
# wget -c http://cr.yp.to/djbdns/djbdns-1.05.tar.gz
# tar xvfz djbdns-1.05.tar.gz
# cd djbdns-1.05
# echo gcc -O2 -include /usr/include/errno.h > conf-cc
# make# make setup check

I want to setup an external forwarding cache (for more configurations check: http://cr.yp.to/djbdns.html)

# useradd Gdnscache -g nofiles -d /nonexistent -s /bin/false# useradd Gdnslog -g nofiles -d /nonexistent -s /bin/false# dnscache-conf Gdnscache Gdnslog /etc/dnscache X.X.X.X

Add your ISP DNS servers

# emacs /etc/dnscache/root/servers/@
# echo 1 > /etc/dnscache/env/FORWARDONLY
# ln -s /etc/dnscache /service
# touch /etc/dnscache/root/ip/X (your network here)

This is all. In order to verify the setup just do a tail -f /service/dnscache/log/main/current on the server and dig @server www.len.ro on a machine in the network several times. The second time the entry should be already cached from the first request.