<HEAD>
<TITLE>MaraDNS Quick Start guide</TITLE>

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">

</HEAD>
<BODY>
<i>This guide is for experienced UNIX/Linux/BSD users who just want to 
   quickly try out MaraDNS</i>
<p>
MaraDNS acts as an authoritative DNS server.  Recursion is handled by
the included "Deadwood" program.  
<p>

To try out Deadwood as a recursive nameserver:
<ul>

<li>Compile MaraDNS and Deadwood.  Type in './configure; make' in the 
  top-level MaraDNS directory.
  Note: No need to compile if you downloaded a binary RPM or Debian package.

<li>The the file deadwood-{version number}/src/Deadwood and place it in
    /usr/local/sbin

<li>Take the file server/maradns and place it in /usr/local/sbin

<li> Take the file tools/duende and place it in /usr/local/sbin

<li>Create an empty directory called /etc/maradns

<li>Create a dwood3rc file.  This file only needs to be three lines long
    on systems with a /dev/urandom file.
<p>
     Here is a sample dwood3rc file:
<pre>
	ipv4_bind_addresses = "127.0.0.1"
	chroot_dir = "/etc/maradns"
	recursive_acl = "127.0.0.1"
</pre>
     This dwood3rc file says that MaraDNS will have the ip "127.0.0.1" (this
     is the bind_address), run from the directory /etc/maradns (the chroot_dir
     value), and only allow the ip "127.0.0.1" to make recursive queries (the
     recursive_acl value).

<li>Place the dwood3rc file in the location /etc/dwood3rc on your system.

<li>Run Deadwood as a non-daemon: 
<blockquote>
<pre>
	/usr/local/sbin/Deadwood
</pre>
</blockquote>
Since Deadwood needs to bind to a privileged port (port 53), it needs
to start up running as root.  Deadwood is designed with security in mind, and
will drop root privileges before being visible to the public internet.

<li>Test Deadwood in another window or virtual terminal
     
<blockquote>
<pre>
	dig @127.0.0.1 www.yahoo.com
</pre>
</blockquote>

<li>In order to make the duende daemonizing tool usable, create a directory
    named /etc/maradns/logger/

<blockquote>
<pre>
	mkdir /etc/maradns/logger
</pre>
</blockquote>

<li>If this works, make Deadwood run as a daemon:

<blockquote>
<pre>
	/usr/local/sbin/duende /usr/local/sbin/Deadwood
</pre>
</blockquote>

     duende is a tool that daemonizes maradns; the daemonizer is a separate
     program.

<li>If this all works, install MaraDNS and Deadwood:
<blockquote>
<pre>
	make install
</pre>
</blockquote>
</ul>
<p>

It is also possible to set up the program "maradns" as an authoritative
name server:

<ul>
<li>Here is the MaraRC file:
<pre>
	ipv4_bind_addresses = "127.0.0.1"
	chroot_dir = "/etc/maradns"
	csv2 = {}
	csv2["example.com."] = "db.example.com"
</pre>
<li>Have a zone file named db.example.com in the <tt>chroot_dir</tt> 
    (<tt>/etc/maradns</tt> above) that looks like this:
<pre>
example.com. 10.1.2.3
</pre>
    (Yes, experienced DNS admins, you can have SOA, NS, MX, SRV, and any other
     kind of DNS data stored in a csv2 zone file.  Read the csv2 man page for
     details)
<li>Queries for <tt>example.com</tt> will resolve to 10.1.2.3
<li>Any other 
<tt>name.example.com</tt> query will return a "this host does not exist"
DNS reply.
</ul>

Look in doc (in particular, the tutorial), or read the relevant man 
pages for more information on how to set up Deadwood and MaraDNS.
<p>

</ul>

</body>
