in.dns DNS Server
Copyright(c)2008, Robin Rawson-Tetley
This application is covered by the terms of the GPLv2.

in.dns is a tiny, inetd-based DNS server designed for devices with
limited resources. I used it to replace BIND on my slug as it
does not run when requests aren't being made and my home network
is pretty low traffic with only 10 or so connected devices.

This is NOT a DNS server for the internet, it does not do recursive
queries, zone transfers or any of that stuff. It has a simple
configuration file (/etc/in.dns.conf) in the form:

host1.domain1.          10.0.0.1
host2.domain1.          10.0.0.2
host1.domain2.          192.168.0.1
host2.domain2.          192.168.0.2

And uses these to only answer A and PTR queries (all that you need on most
small networks).

It will give a response for anything that appears in its
configuration file and anything that doesn't fails fast, so your
resolver should try the next DNS server (which will be your internet/ISP).

Make sure your DHCP server issues your in.dns server first for your
network and then any other DNS servers for the internet.

INSTALLATION:
=================

1. Compile in.dns:

    sh compile.sh

    (you can also edit this file and use the line below "exit 0" to compile
    in.dns with debug information sent to syslog and response packets dumped
    to a file in /tmp).

2. Copy to your path:

   cp in.dns /usr/local/bin

3. Create /etc/in.dns.conf and add your hosts.

4. Add an inetd entry to inetd.conf:

   domain dgram udp wait nobody /usr/local/bin/in.dns

5. Restart inetd
