<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<TITLE>Four Calorie DNS Server Tour Page</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MANUAL" name=GENERATOR>
</HEAD>
<BODY>
<IMG SRC="images/logo1.png">
<HR>
<P>
<B>Welcome to the Four Calorie DNS Server for FreeBSD 6.0 (i386), <BR>(fourcdns - beta test version) <BR><BR>
This program was developed to be a companion to the "Four Calorie Web"
server application,<BR> another of our programs that is available on the internet.
Older versions may be referred<BR> to as the "Zero Calorie DNS" You may substitute the
term "four" for "zero" (and vice versa) in the documentation and license.txt files.<BR>
Please read the license file (License.txt)
</B><BR><BR>
<P>
<HR>
<P> This is the maiden voyage for this beta test version, so please
be informed that the user accepts all risks involved with the usage of the software, or the inability to use the software.
This version is very preliminary, and should not be used on the public internet (technically, it is capable of DNS service on an <I>internet or
an intranet</I>).
</P>
<P><B>Basic configuration </B>
<P>
The server may be bound to any legal address and any legal port (valid ports
are 1 thru 65535). The default port is 53, and the default address is 127.0.0.1,
as specified in the configuration file (/usr/local/zerocaloriedns/zerocaloriedns.set) which
can be found in the /usr/local/zerocaloriedns directory. The configuration file is named
"zerocaloriedns.set" in both the "zero" calorie and "four" calorie distributions. The application
directory is named "/usr/local/zerocaloriedns" in both distributions.
</P>
<P>
Note that the configuration file is a simple text file. (You may edit it with
vi or gedit if you wish.)
</P>
<P>The configuration file may contain four lines, as follows:
<UL>
<LI>ServerAddress
<LI>Port
<LI>DomainName
<LI>DomainAddress
</UL>
</P>
Only the information is supplied, without tags, and it
must be in the correct order. The following example displays the contents of the default
configuration file that is supplied with the installation media:
<P> 127.0.0.1<BR>53<BR>zerocalorieweb.com <BR>127.0.0.1
<P>
Note that the domain name is the primary domain name, and <B> does not </B> include the
www "server" segment of the domain name. The "sub-domain" which is the third segment (immediately to the left of the
primary domain name) is often a mnemonic for the server type. The DNS server will be able
to resolve the "www" segment automatically, but it should not be added to the configuration
file. If the domain address is too short, it will be padded with zeroes.
(An entry of "2" would be translated to "2.0.0.0") Use complete four segment internet addresses. <BR><BR>
<I>The first entry (the address of the machine that the server is running on) will be used
as a binding hint, but the server may bind to other addresses that it is able to find
on the machine. Errors in the configuration file may cause the server to immediately exit it's
process when it is executed.</I><BR>
<P>
Changes made to the configuration file(s) are not effective until the server is stopped
and restarted. Re-executing the fourcdns file will not stop the server. Therefore,
the user should execute a kill command first. Assuming that there are no other unrelated
fourcdns processes running, the user could restart the server by executing:
<BR><BR>
killall fourcdns<BR>
./fourcdns
<BR><BR>
The Windows version of the DNS package sports a
nice utility for DNS Server management/monitoring. It is ZeroCDNSManager.exe, and is one of the
start menu items. <BR><BR>
The FreeBSD 6.0 X Windows GUI for DNS server management is referred to by the file name fourcdnsmgr6:
<BR><BR>
fourcdnsmgr6
</P>
<HR>
<BR><B>A Little Background ... </B><BR><BR>
<HR>
<P>
This server was developed to be a companion to the "Four-Calorie-Web" server program, which
is an HTTP web server. A web server without a DNS server is not very useful, unless
your visitors have a good memory for internet addresses!
<BR><BR>
This is the preliminary beta version of the DNS server, and should be used only for
purposes that are not important or that are tolerant of failure. (See license.txt) <BR><BR>
There seems to be a dearth of DNS server applications for the Windows, Solaris, and FreeBSD platforms. Hopefully, this program will (when it eventually passes the hurdle of the beta-testing period) alleviate the DNS-application-scarcity problem. This particular server was designed to have only the functionality needed to power the companion "Four-Calorie-Web-Server" application. <BR><BR>
The server resolves only the user's domain IP address, and no others. It cannot run as a general
purpose public DNS server in it's current configuration. This is an artificial
constraint, but it allows us to concentrate our efforts toward our specific goal (towards
powering the "Four-Calorie-Web" Server).
<BR><BR>
The server currently responds only to UDP requests, although TCP backup functionality
will be considered in the future. The server implements minimum functionality in other ways.
For instance, the header flags recursive bit is not set (recursion is not available). Some
things are "hardwired" this way to allow for maximum simplicity. A user should be able to
set-up the Four Calorie DNS server in a few minutes (If there are any other DNS servers that
can be set-up in two or three minutes, I am not aware of them).<BR><BR>
The server auto-resolves all "server-type mnemonic" requests to the same
one-and-only IP address that is supplied by the user in the configuration file (So long as
the primary domain is correct). <BR><BR> In other words,
<I>www.yourdomain.com and mail.yourdomain.com and ftp.yourdomain.com, and ns111.yourdomain.com all
resolve to the domain IP address </I>.
This auto-resolution would not be desirable in a large server farm.
However, for an individual's toy web-site, it likely is a positive attribute. The server
does not resolve lower subdomains (those deeper than aaa.bbb.ccc).<BR><BR>
Some client resolvers do not handle CNAME entries well, so after some
experimentation, it was decided to disallow CNAME functionality, and just return the primary
domain IP address for the next-level domain entries. A
maximum limit of 38 characters has been implemented for the entire domain. <BR><BR>
The server currently handles standard foward (domain name) queries and reverse IP address queries,
MX, NS, and SOA queries, and little else. However, for a web server to function properly, the DNS server need not service
much more than standard forward and reverse queries. <BR><BR>
The authoritative server flag is always set. The server does not currently support a zone transfer,
but version 1.2.0 now responds to SOA (Start of authority), NS (Nameserver), A (Address record),
MX and PTR (Reverse) requests, and knows to return an empty record for IPv6 requests that it will not
fulfill. <BR><BR>
The serial number is auto-incremented, and changes only once per day, even when the
server is restarted. Since zone transfers are not allowed, this may or may not be an issue.
The NS, ARECORD and PTR requests served by **this** server will be accurate "up to the minute",
so long as the server was restarted after the configuration file change.
<BR><BR>
If one day serial updates are an issue, then don't use this server for your application.
The expiration is fixed (hard coded) to two weeks. For the serial updates to work correctly,
your machine must have a correct CMOS date (Your battery should be working).
<BR><BR>
The domain administrator's email has been hard coded to de@somedomain.com, where somedomain.com
is the content of the third line of the configuration file. The MX record has been hard coded to
mail.somedomain.com, where somedomain.com is defined in the third line of the configuration file.
<BR><BR>
</P>
<HR>
<P>
<B>Installation and Deinstallation Notes<BR><BR></B>
<B><U>Installation</U></B><BR><BR>
</P>
<P>
The installation procedure has been changed to use the FreeBSD ports system. Instead
of extracting the tarball, simply copy the fourcdns-1.1.0.tar.gz file to the
/usr/ports/distfiles directory. Then, while the current directory is still
the directory that the outside tarball was extracted into (fourcdnsTempInstall)
type:<BR><BR>
make install
<BR><BR>
Reboot. Upon restart, you should be able to type the name of the
GUI manager in an X windows terminal (fourcdnsmgr6) to start the GUI manager. You
should be able to start the DNS server manually by typing:<BR><BR>
killall fourcdns<BR>
fourcdns<BR><BR>
You should be able to see the manual pages by typing man fourcdns. Note that the
configuration file should still reside in the /usr/local/zerocaloriedns
directory.
<BR><BR>
The server will display a banner unless the -silent switch is used. The
banner will not indicate whether or not the server was able to bind to
the configured address. You must check the server status with sockstat, top, and
nslookup or dig: <BR><BR>
i.e. dig @127.0.0.1 MX zerocalorieweb.com <BR><BR>
<BR>
</P>
<B>DNS Server Monitor/Manager</B><BR><BR>
The user should be able to use a DNS tool to test the server. Type "zerocalorieweb.com" into the appropriate text box within your chosen DNS tool (or use whatever domain you have included in the ZeroCalorieDNS.SET configuration file). <BR><BR>
The "Four Calorie DNS Manager/Monitor utility" output is shown below:<BR><BR>
<IMG SRC="images/DNSManager.png"><BR>Figure 1b<BR><BR>
<HR>
<B> DNS Tools </B><BR><BR>
Your DNS tool should allow you to obtain a response appropriate for the configuration file that you
have supplied. NSLookup is a good tool for DNS testing, and is supplied with the
wonderful MSys package. (See the shameless plug in the next section) Alternatively, if you have a
unix machine on your network, you can use the DIG utility to get a nice summary output from
the DNS server.<BR><BR>
</P>
<BR>
The "sockstat -cl4" output is shown in figure 2:<BR><BR>
<IMG SRC="images/fourcdnssockstat.png"><BR> Figure 2<BR><BR><BR>
<B> Ethereal utility</B><BR><BR>
Ethereal is a utility that is available for Windows and for various unix variants. The use of this utility
is a great way to view the more arcane detail of the output of the "Four Calorie DNS Server". Note that
on windows, the Ethereal utility requires the "PCAP for Windows" software to be pre-installed. The
PCAP packet capture software is available as a freeware (beta version) download. <BR><BR>
The "Ethereal" utility output is shown in figure 3:<BR><BR>
<IMG SRC="images/ether.png"><BR> Figure 3<BR><BR>
<P>
Note that many internet web servers run in concert with a DNS server that handles only one domain.
The internet registry record points to a domain IP address for the owner's nameserver, and that nameserver may
in many cases be capable of returning only the IP-address for a single domain. (The owner's domain)
<BR><BR>
This DNS server is designed to do just that -- return the domain information for a single domain. This
model was chosen to create maximum simplicity, and a minimum of configuration headaches. The name server
has a fixed built-in name (ns111.yourdomain.com), where yourdomain.com is the domain that the
user entered into the third line of the configuration file. The last line of the configuration file is
the address of the domain and nameserver. (This is in contrast to the first line of the configuration
file, which is the address of the machine that the DNS server is running on). The addresses do not need to
reference the same machine. <BR><BR> If there are conflicts with the ns111 nameserver name, then you will have to
adjust the other conflicting name server to resolve the issue. If you have a big server farm, you probably
are not using this DNS server anyway. (And shouldn't be, as this version is the number one cut of the beta
test distribution!)<BR><BR><BR>
<B> Easy DNS - HTTP setup ... all on one machine! </B><BR><BR>
We stipulate that this beta version cannot be used on the public internet, however; the
following list describes what would be the relationship between the HTTP server and the
DNS server in any future public deployment of the HTTP and DNS servers:
<UL>
<LI> The domain name registry record at Register.com (or wherever it is maintained) contains the address of the name server
(Four Calorie DNS server, in our case) for the somedomain.com domain <BR><BR>
<LI> The DNS configuration file of the DNS server contains the address of the domain
(which in a one server setup, will also be the address of the HTTP server. (Four
Calorie Web Server, in our case) <BR><BR>
<LI> The web server is bound to port 80 on a machine that has been assigned the
aforementioned address. (Everything is on one machine, in our case, and all three
configuration file addresses are the same domain address) <BR><BR>
<LI> A random user browses the internet, and finds a link to our www.somedomain.com site.
Random user clicks on the browser link. The browser uses what is known as a
"resolver" to query the client's assigned DNS address, which at some point will query
the root servers (or some other server) for our nameserver address
as it is recorded by the registrar record. <BR><BR>
<LI> The browser then knows where our nameserver is, and queries our nameserver for the
resolution of www.somedomain.com. Our nameserver (Four Calorie DNS Server) returns
a result to the browser (which is the same domain IP address as the web http server
in our one-machine configuration.) <BR><BR>
<LI> The browser, with our web server's address in hand, transfers our web pages from the
web server to the browser, and displays same.
</UL>
<BR><BR>
The just described scenario is shown in the diagram of figure 4 <BR><BR>
<IMG SRC="images/doverview3.png"><BR>
Figure 4
<BR><BR>
<P>
Please read the license.txt file included with the installation media. This
version of the DNS server runs on FreeBSD 6.0 (i386)
No particular level of security is indicated or warranted for any portion of this software.<BR><BR>
</P>
<P>
The output of the installation script that is generated via the FreeBSD ports
mechanism is shown in figure five. <BR><BR>
<IMG SRC="images/fourcdnsinstallshot.png"><BR> Figure 5<BR><BR><BR>
<P>
<B> Let us know what you think! </B>
<BR><BR>
Note that this program is still in the development and testing phase, so
perfect function is not assured. <BR>
- don't use it for anything important!
<P><I>
Email suggestions to: rleesBSD@gmail.com, with subject line /Attn: RScheckelhoff /REF: Datazygte DNS </I>
<BR><BR>
</BODY></HTML>
syntax highlighted by Code2HTML, v. 0.9.1