<?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>Reaper-X &#187; DNS Server</title>
	<atom:link href="http://www.reaper-x.com/category/technology/computer/software/dns-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.reaper-x.com</link>
	<description>Technology, Games, Blogging ... Whatever</description>
	<lastBuildDate>Thu, 12 Nov 2009 08:50:15 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Set up Caching Nameserver on Windows using BIND</title>
		<link>http://www.reaper-x.com/2008/07/10/set-up-caching-nameserver-on-windows-using-bind/</link>
		<comments>http://www.reaper-x.com/2008/07/10/set-up-caching-nameserver-on-windows-using-bind/#comments</comments>
		<pubDate>Thu, 10 Jul 2008 10:21:52 +0000</pubDate>
		<dc:creator>Reaper-X</dc:creator>
				<category><![CDATA[DNS Server]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[bind]]></category>
		<category><![CDATA[bind tools]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[caching nameserver]]></category>
		<category><![CDATA[home dns server]]></category>
		<category><![CDATA[nameserver]]></category>
		<category><![CDATA[windows bind]]></category>

		<guid isPermaLink="false">http://www.reaper-x.com/?p=743</guid>
		<description><![CDATA[How to set up a local caching nameserver on windows using BIND to cache dns request for faster dns queries


Related posts:<ul><li><a href='http://www.reaper-x.com/2006/09/17/how-to-purge-bad-cache-from-squid/' rel='bookmark' title='Permanent Link: How to purge bad cache from SQUID'>How to purge bad cache from SQUID</a></li><li><a href='http://www.reaper-x.com/2006/07/18/complete-guide-on-installing-and-configuring-squid-proxy-server-for-windows/' rel='bookmark' title='Permanent Link: Complete Guide on Installing and Configuring Squid Proxy Server for Windows'>Complete Guide on Installing and Configuring Squid Proxy Server for Windows</a></li><li><a href='http://www.reaper-x.com/2007/09/24/installing-and-setting-up-apache-22-series-with-php-5-on-windows/' rel='bookmark' title='Permanent Link: Installing and Setting up Apache 2.2 series with PHP 5 on Windows'>Installing and Setting up Apache 2.2 series with PHP 5 on Windows</a></li><li><a href='http://www.reaper-x.com/2008/07/02/how-to-compile-mangos-and-scriptdev2-for-windows/' rel='bookmark' title='Permanent Link: How to Compile Mangos and Scriptdev2 for Windows'>How to Compile Mangos and Scriptdev2 for Windows</a></li><li><a href='http://www.reaper-x.com/2007/03/06/downloading-and-configuring-windows-to-play-flash-video-flv-file-the-hard-way/' rel='bookmark' title='Permanent Link: Downloading and Configuring Windows to Play Flash Video (FLV) File &#8211; The Hard Way'>Downloading and Configuring Windows to Play Flash Video (FLV) File &#8211; The Hard Way</a></li></ul>]]></description>
			<content:encoded><![CDATA[<p>I think most of you who are running Linux as the operating system already know that you can set up a caching nameserver on your home computer in order to speed up dns queries. But what if you&rsquo;re on Windows and want to achieve the same thing (cache dns request)? Well thanks to BIND port for Windows, now you can also set up your own DNS Server on Windows easily (although in my case because my ISP DNS Server often down and running CentOS inside Virtual Machine just for this purpose isn&rsquo;t all that useful considering there&rsquo;s already a port of BIND / Named&nbsp;for Windows).</p>
<p>And to make things short, let&rsquo;s get straight to the point ;)</p>
<p>1. First you&rsquo;ll need to grab <a href="http://www.isc.org/sw/bind/" >Bind from the ISC homepage</a>&nbsp;(grab the Windows version of course), and at the time i wrote this, the latest <em>Bind / Named version is 9.5.0&ndash;P1</em></p>
<p>2. When you&rsquo;ve finished downloading BIND, now just you need to extract it somewhere on your harddrive and then followed by running <strong>BINDInstall.exe</strong> to install BIND. But first as a note, in this example i choose to Install BIND into <strong>C:\BIND</strong></p>
<p>3. After the installation process finished, you&rsquo;ll need to set up an&nbsp;environment variable path first to make it easier for you to call various BIND tools from any directory inside the command prompt. To do this you just need to go into <strong>Control Panel -&gt; System -&gt; Advanced -&gt; Environment Variable</strong>. And then <strong>add / edit PATH</strong> to your BIND\bin directory &hellip; and based from this example the BIND\bin directory would be <strong>C:\BIND\bin</strong></p>
<p>4. Now you need to create&nbsp;two folders / directories inside your BIND directory, let&rsquo;s called it <strong>log </strong>(the end result would be <strong>C:\BIND\log</strong>) and zone (<strong>C:\BIND\zone</strong>)</p>
<p>5. Now to set up caching nameserver on windows using bind (so you can start the BIND service), you need to create a filename inside the <strong>etc directory under BIND</strong> directory called <strong>named.conf</strong> and then write these lines into the named.conf</p>
<p>
<code><br />
options {<br />
directory &#34;c:\bind\zone&#34;;<br />
allow-query { localhost; };<br />
forwarders { <strong>XXXXXX; XXXXXX;</strong> };<br />
forward only; query-source address * port 53;<br />
};<br />
logging {<br />
channel queries_log {<br />
file &#34;c:\bind\log\queries.log&#34;;<br />
print-severity yes;<br />
print-time yes;<br />
};<br />
category queries { queries_log ; };<br />
};<br />
zone &#34;localhost.&#34; IN {<br />
type master;<br />
file &#34;localhost.zone&#34;;<br />
allow-update { none; };<br />
};<br />
zone &#34;0.0.127.in-addr.arpa.&#34; IN {<br />
type master;<br />
file &#34;localhost.rev&#34;;<br />
allow-update { none; };<br />
};<br />
include &#34;c:\bind\etc\rndc.key&#34;;<br />
</code>
</p>
<p>Note: Change XXXX into your ISP DNS Server, and also i put a logging for every request made but you can always turned off the logging feature if you want</p>
<p>6. Now you need to create two files inside the zone directory (C:\Bind\Zone) called <strong>localhost.zone</strong>, and <strong>localhost.rev</strong> and then write these lines:</p>
<p><strong><em>localhost.zone</em></strong></p>
<p>
<code><br />
$TTL    86400<br />
@               IN SOA  @       root (<br />
                                        42              ; serial<br />
                                        3H              ; refresh<br />
                                        15M             ; retry<br />
                                        1W              ; expiry<br />
                                        1D )            ; minimum<br />
                IN NS           @<br />
                IN A            127.0.0.1<br />
                IN AAAA         ::1<br />
</code>
</p>
<p><strong><em>localhost.rev</em></strong></p>
<p>
<code><br />
$TTL    86400<br />
@       IN      SOA     localhost. root.localhost.  (<br />
                                      1997022700 ; Serial<br />
                                      28800      ; Refresh<br />
                                      14400      ; Retry<br />
                                      3600000    ; Expire<br />
                                      86400 )    ; Minimum<br />
        IN      NS      localhost.<br />
1       IN      PTR     localhost.<br />
</code>
</p>
<p>7. Now you need to open the command prompt and type:</p>
<p>
<code><br />
cd C:\BIND\bin<br />
rndc-confgen -a<br />
</code>
</p>
<p>8. Now go into windows directory -&gt; system32 -&gt; drivers -&gt; etc &hellip; and create a filename called <strong>resolv.conf</strong> and write this line into resolv.conf</p>
<p><code>nameserver 127.0.0.1</code></p>
<p>9. Now we need to start the BIND service first. To do this you just need to type <em>services.msc</em> from the RUN Command&nbsp;or you can also get into Windows services from <em>Control Panel -&gt; Administrative Tools -&gt; Services</em> &hellip; and then start the <strong>ISC BIND</strong> service</p>
<p>10. Since everything has been configured, the last step would be testing it of course, to do this you just need&nbsp;to go into the command prompt and type:</p>
<p><code>dig reaper-x.com</code></p>
<p>At the first time you&rsquo;ll see something like this (note: result may vary)</p>
<p><code>Query time: 453 msec</code></p>
<p>Now type (again)</p>
<p><code>dig reaper-x.com</code></p>
<p>and if&nbsp;you get (or at least the query time gets reduced)</p>
<p><code>Query time: 0 msec</code></p>
<p>11. Finally you just need to change the preferred DNS Server in your connection into 127.0.0.1 and you&#8217;re done</p>
<p>That means you&rsquo;ve configured your caching nameserver using BIND on windows to cache dns request, congrats :)</p>
<p>But wait, what if you want to flush your dns cache? .. in order to flush your dns cache, all you have to do is just execute this command in the command prompt</p>
<p><code>rndc flush</code></p>
<p>Well basically that&rsquo;s all about it :)</p>
	<p></p>
	<p><em>Copyright &copy; <a href="http://www.reaper-x.com"  title="Reaper-X Technology">Reaper-X Technology</a> &ndash; www.reaper-x.com | <a href="http://www.reaper-x.com/2008/07/10/set-up-caching-nameserver-on-windows-using-bind/"  title="Set up Caching Nameserver on Windows using BIND">Permalink</a> | <a href="http://www.reaper-x.com/2008/07/10/set-up-caching-nameserver-on-windows-using-bind/#comments"  title="10 comments">10 comments</a></em></p>
	<p><em><a href="http://www.reaper-x.com" >0x87485B96</a> | Tags : <a href="http://www.reaper-x.com/category/technology/computer/software/dns-server/" rel="nofollow"  title="View all posts in DNS Server" rel="category tag">DNS Server</a>,  <a href="http://www.reaper-x.com/category/how-to/" rel="nofollow"  title="View all posts in How To" rel="category tag">How To</a>,  <a href="http://www.reaper-x.com/category/how-to/tutorials/" rel="nofollow"  title="View all posts in Tutorials" rel="category tag">Tutorials</a>,  <a href="http://www.reaper-x.com/category/technology/computer/software/windows/" rel="nofollow"  title="View all posts in Windows" rel="category tag">Windows</a></em></p>

<p>Related posts:<ul><li><a href='http://www.reaper-x.com/2006/09/17/how-to-purge-bad-cache-from-squid/' rel='bookmark' title='Permanent Link: How to purge bad cache from SQUID'>How to purge bad cache from SQUID</a></li><li><a href='http://www.reaper-x.com/2006/07/18/complete-guide-on-installing-and-configuring-squid-proxy-server-for-windows/' rel='bookmark' title='Permanent Link: Complete Guide on Installing and Configuring Squid Proxy Server for Windows'>Complete Guide on Installing and Configuring Squid Proxy Server for Windows</a></li><li><a href='http://www.reaper-x.com/2007/09/24/installing-and-setting-up-apache-22-series-with-php-5-on-windows/' rel='bookmark' title='Permanent Link: Installing and Setting up Apache 2.2 series with PHP 5 on Windows'>Installing and Setting up Apache 2.2 series with PHP 5 on Windows</a></li><li><a href='http://www.reaper-x.com/2008/07/02/how-to-compile-mangos-and-scriptdev2-for-windows/' rel='bookmark' title='Permanent Link: How to Compile Mangos and Scriptdev2 for Windows'>How to Compile Mangos and Scriptdev2 for Windows</a></li><li><a href='http://www.reaper-x.com/2007/03/06/downloading-and-configuring-windows-to-play-flash-video-flv-file-the-hard-way/' rel='bookmark' title='Permanent Link: Downloading and Configuring Windows to Play Flash Video (FLV) File &#8211; The Hard Way'>Downloading and Configuring Windows to Play Flash Video (FLV) File &#8211; The Hard Way</a></li></ul></p>]]></content:encoded>
			<wfw:commentRss>http://www.reaper-x.com/2008/07/10/set-up-caching-nameserver-on-windows-using-bind/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
