<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>phantez’s blog &#187; DNS</title>
	<atom:link href="http://www.phantez.net/blog/tag/dns/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phantez.net/blog</link>
	<description></description>
	<lastBuildDate>Fri, 03 Sep 2010 10:48:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>DNS local server</title>
		<link>http://www.phantez.net/blog/2008/10/dns-local-server/</link>
		<comments>http://www.phantez.net/blog/2008/10/dns-local-server/#comments</comments>
		<pubDate>Sun, 05 Oct 2008 10:07:14 +0000</pubDate>
		<dc:creator>phantez</dc:creator>
				<category><![CDATA[Informatique]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://phantez.wordpress.com/?p=74</guid>
		<description><![CDATA[I installed a dns local server on my local network. The aim is to have a local name resolution for all my local hosts and a caching dns server to communicate with the external hosts. For that I chose to use Tinydns and Dnscache. Those tools can be download on http://cr.yp.to/djbdns.html. You need to install [...]]]></description>
			<content:encoded><![CDATA[<p>I installed a dns local server on my local network. The aim is to have a local name resolution for all my local hosts and a caching dns server to communicate with the external hosts. For that I chose to use Tinydns and Dnscache. Those tools can be download on <a href="http://cr.yp.to/djbdns.html">http://cr.yp.to/djbdns.html</a>.</p>
<p>You need to install :</p>
<ul>
<li><a href="http://cr.yp.to/daemontools.html">Daemontools</a> to manage the services</li>
<li><a href="http://cr.yp.to/djbdns.html">ucspi-tcp</a> to deal with tcp connections</li>
<li><a href="http://cr.yp.to/ucspi-tcp.html">djbdns</a> the dns services</li>
</ul>
<p>Installing Daemontools :</p>
<blockquote><p># mkdir -p /package<br />
# chmod 1755 /package<br />
% cd /package<br />
# wget http://cr.yp.to/daemontools/daemontools-0.76.tar.gz<br />
# gunzip daemontools-0.76.tar<br />
# tar -xpf daemontools-0.76.tar<br />
# rm daemontools-0.76.tar<br />
% cd admin/daemontools-0.76<br />
# package/install</p></blockquote>
<p>Installing ucspi-tcp</p>
<blockquote><p># wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz<br />
# gunzip ucspi-tcp-0.88.tar<br />
# tar -xf ucspi-tcp-0.88.tar<br />
% cd ucspi-tcp-0.88<br />
# make<br />
# make setup check</p></blockquote>
<p>Installing djbdns</p>
<blockquote><p># wget http://cr.yp.to/djbdns/djbdns-1.05.tar.gz<br />
# gunzip djbdns-1.05.tar<br />
# tar -xf djbdns-1.05.tar<br />
% cd djbdns-1.05<br />
# echo gcc -O2 -include /usr/include/errno.h &gt; conf-cc<br />
# make<br />
# make setup check</p></blockquote>
<p>Create users</p>
<blockquote><p># adduser –no-create-home –disabled-login -shell /bin/false dnscache<br />
# sudo adduser –no-create-home –disabled-login -shell /bin/false dnslog<br />
# sudo adduser –no-create-home –disabled-login -shell /bin/false tinydns</p></blockquote>
<p>Setting up dnscache environment</p>
<blockquote><p># dnscache-conf dnscache dnslog /etc/dnscache 192.168.0.12<br />
# ln -s /etc/dnscache /service<br />
% sleep 5<br />
# svstat /service/dnscache<br />
# echo &laquo;&nbsp;nameserver 192.168.0.12&#8243; &gt; /etc/resolv.conf<br />
# touch /etc/dnscache/root/ip/192.168.0<br />
# echo &laquo;&nbsp;127.0.0.1&#8243; &gt; /etc/dnscache/root/servers/lan.phantez.net<br />
# echo &laquo;&nbsp;127.0.0.1&#8243; &gt; /etc/dnscache/root/servers/1.168.192.in-addr.arpa</p></blockquote>
<p>Setting up tinydns environment</p>
<blockquote><p># tinydns-conf tinydns dnslog /etc/tinydns 127.0.0.1<br />
% cd /service/tinydns/root<br />
# ./add-ns lan.phantez.net 192.168.0.12<br />
# ./add-ns 0.168.192.in-addr.arpa 192.168.0.12<br />
# ./add-host franck.lan.phantez.net 192.168.0.10<br />
# ./add-alias www.lan.phantez.net 192.168.0.10<br />
# make</p></blockquote>
<p>Reloading services</p>
<blockquote><p># svc -t /service/tinydns/<br />
# svc -t /service/dnscache/</p></blockquote>
<p><strong>Resources :<br />
</strong><br />
<a href="http://www.linuxfromscratch.org/hints/downloads/files/PREVIOUS_FORMAT/djbdns.txt">http://www.linuxfromscratch.org/hints/downloads/files/PREVIOUS_FORMAT/djbdns.txt</a><br />
<a href="http://www.fredshack.com/docs/djbdns.html">http://www.fredshack.com/docs/djbdns.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.phantez.net/blog/2008/10/dns-local-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
