<?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>Unix Surgeon &#187; bind</title>
	<atom:link href="http://www.unixsurgeon.com/kb/tag/bind/feed" rel="self" type="application/rss+xml" />
	<link>http://www.unixsurgeon.com/kb</link>
	<description>Linux Hosting Solution, Linux Web Hosting Solution, Learn Linux, How to, Server Management , Web Hosting Solution , Linux Solution , KnowledgeBase , Linux Tutorial</description>
	<lastBuildDate>Mon, 06 Feb 2012 10:42:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to DNS server in Linux&#8230;.</title>
		<link>http://www.unixsurgeon.com/kb/how-to-dns-server-in-linux.html</link>
		<comments>http://www.unixsurgeon.com/kb/how-to-dns-server-in-linux.html#comments</comments>
		<pubDate>Tue, 18 May 2010 00:16:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[DNS Server]]></category>
		<category><![CDATA[Linux tutorials]]></category>
		<category><![CDATA[bind]]></category>
		<category><![CDATA[bind setup]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[how to setup dns server]]></category>
		<category><![CDATA[named]]></category>

		<guid isPermaLink="false">http://www.unixsurgeon.com/kb/?p=35</guid>
		<description><![CDATA[Under RHEL5, these are the packages that are mendatory to setup DNS sever :-
bind-9.3.3-9.0.1.el5
system-config-bind-4.0.3-2.el5
bind-libs-9.3.3-9.0.1.el5
bind-chroot-9.3.3-9.0.1.el5
bind-utils-9.3.3-9.0.1.el5



You can use the chkconfig command to get BIND configured to start at boot:-
[root@p-root]# chkconfig –levels 2345 named on
To start, stop, and restart BIND after booting, use:-
[root@p-root]# /etc/init.d/named start
[root@p-root]# /etc/init.d/named stop
[root@p-root]# /etc/init.d/named restart
When you installed named that directory is /var/named/chroot is actually [...]]]></description>
			<content:encoded><![CDATA[<p>Under RHEL5, these are the packages that are mendatory to setup DNS sever :-</p>
<p>bind-9.3.3-9.0.1.el5</p>
<p>system-config-bind-4.0.3-2.el5</p>
<p>bind-libs-9.3.3-9.0.1.el5</p>
<p>bind-chroot-9.3.3-9.0.1.el5</p>
<p>bind-utils-9.3.3-9.0.1.el5</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7877248176171699";
google_ad_slot = "4635030684";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>You can use the chkconfig command to get BIND configured to start at boot:-</p>
<p>[root@p-root]# chkconfig –levels 2345 named on</p>
<p>To start, stop, and restart BIND after booting, use:-</p>
<p>[root@p-root]# /etc/init.d/named start</p>
<p>[root@p-root]# /etc/init.d/named stop</p>
<p>[root@p-root]# /etc/init.d/named restart</p>
<p>When you installed named that directory is /var/named/chroot is actually the root or / directory. Therefore, named files normally found in the /etc directory are found in /var/named/chroot/etc directory instead, and those you’d expect to find in /var/named are actually located in /var/named/chroot/var/named.</p>
<p>You can define named how to run in the configuration file /etc/named.conf, and you also put the information about which zones it will be authoritative for. An example named.conf:</p>
<p>Code:</p>
<p>options {</p>
<p>directory “/var/named”;</p>
<p>dump-file “/var/named/data/cache_dump.db”;</p>
<p>statistics-file “/var/named/data/named_stats.txt”;</p>
<p>recursion no;</p>
<p>/*</p>
<p>* If there is a firewall between you and nameservers you want</p>
<p>* to talk to, you might need to uncomment the query-source</p>
<p>* directive below. Previous versions of BIND always asked</p>
<p>* questions using port 53, but BIND 8.1 uses an unprivileged</p>
<p>* port by default.</p>
<p>*/</p>
<p>// query-source address * port 53;</p>
<p>};</p>
<p>//</p>
<p>// a caching only nameserver config</p>
<p>//</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7877248176171699";
google_ad_slot = "4635030684";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>controls {</p>
<p>inet 127.0.0.1 allow { localhost; } keys { rndckey; };</p>
<p>};</p>
<p>zone “.” IN {</p>
<p>type hint;</p>
<p>file “named.ca”;</p>
<p>};</p>
<p>include “/etc/rndc.key”;</p>
<p>};</p>
<p>zone “11.168.192.in-addr.arpa” IN {</p>
<p>type master;</p>
<p>file “/var/named/zones/192.168.11.zone”;</p>
<p>allow-update { none; };</p>
<p>};</p>
<p>zone “unixsurgeon.com” IN {</p>
<p>type master;</p>
<p>file “/var/named/zones/unixsurgeon.com.zone”;</p>
<p>allow-update { none; };</p>
<p>};</p>
<p>And then, at /var/named/zones/unixsurgeon.com.zone, you have the zone file,look like this:</p>
<p>; Zone File for mydomain.com</p>
<p>$TTL 14400</p>
<p>@ 14440 IN SOA ns1.unixsurgeon.com. info@unixsurgeon.com. ( 2006102400</p>
<p>14400</p>
<p>7200</p>
<p>3600000</p>
<p>86400</p>
<p>)</p>
<p>unixsurgeon.com. 14400 IN NS ns1.unixsurgeon.com.</p>
<p>unixsurgeon.com. 14400 IN NS ns2.unixsurgeon.com.</p>
<p>unixsurgeon.com. 14400 IN A 192.168.11.1</p>
<p>unixsurgeon.com. 14400 IN MX 0 mail.unixsurgeon.com.</p>
<p>localhost 14400 IN A 127.0.0.1</p>
<p>mail 14400 IN A 192.168.11.1</p>
<p>www 14400 IN CNAME unixsurgeon.com.</p>
<p>unixsurgeon.com. 14400 IN MX 5 unixsurgeon.com.</p>
<p>And then, at /var/named/zones/11.168.192.zone, look like this:</p>
<p>;</p>
<p>; Filename: 192-168-11.zone</p>
<p>;</p>
<p>; Zone file for 192.168.11.x</p>
<p>;</p>
<p>$TTL 3D</p>
<p>@ IN SOA www.unixsurgeon.com. hostmaster.unixsurgeon.com. (</p>
<p>200303301 ; serial number</p>
<p>8H ; refresh, seconds</p>
<p>2H ; retry, seconds</p>
<p>4W ; expire, seconds</p>
<p>1D ) ; minimum, seconds</p>
<p>NS www ; Nameserver Address</p>
<p>11 PTR unixsurgeon.com.</p>
<p>12 PTR blog.unixsurgeon.com.</p>
<p>Now Save your configurations file and restart your dns service.</p>
<p>To start, stop, and restart BIND after booting, use:-</p>
<p>[root@p-root]# /etc/init.d/named start</p>
<p>[root@p-root]# /etc/init.d/named stop</p>
<p>[root@p-root]# /etc/init.d/named restart</p>
<p>The /etc/resolv.conf File</p>
<p>DNS clients (servers not running BIND) use the /etc/resolv.conf file to determine both the location of their DNS server and the domains to which they belong. The file generally has two columns; the first contains a keyword, and the second contains the desired values separated by commas.Like this :-</p>
<p>search unixsurgeon.com</p>
<p>nameserver 192.168.11.1</p>
<p>nameserver 192.168.11.2</p>
<p>The host command accepts arguments that are either the fully qualified domain name or the IP address of the server when providing results. To perform a forward lookup, use the syntax:</p>
<p>[root@p-root]# host www.unixsurgeon.com</p>
<p>www.unixsurgeon.com point to 192.168.11.1</p>
<p>[root@p-root]#</p>
<p>To check a reverse lookup or RDNS</p>
<p>[root@p-root]# host 192.168.11.1</p>
<p>1.11.168.192.in-addr.arpa domain name pointer 192-168-11-1.mycomisp.in.</p>
<p>[root@p-root]#</p>
<p>The nslookup command on Windows PCs. To check forward lookup</p>
<p>C:\&gt; nslookup www.unixsurgeon.com</p>
<p>Server: 192-168-11-20.my-server.com</p>
<p>Address: 192.168.11.20</p>
<p>Non-authoritative answer:</p>
<p>Name: www.unixsurgeon.com</p>
<p>Address: 192.168.11.1</p>
<p>C:\&gt;</p>
<p>To check a reverse lookup</p>
<p>C:\&gt; nslookup 192.168.11.1</p>
<p>Server: 192-168-11-20.my-server.com</p>
<p>Address: 192.168.11.20</p>
<p>Name: 192-168-11-1.my-comisp.in</p>
<p>Address: 192.168.11.1</p>
<p>Take a look at the end of your /var/log/messages file to make sure there are no errors.</p>
<p>Enjoy Linux !!! <img src='http://www.unixsurgeon.com/kb/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7877248176171699";
google_ad_slot = "4635030684";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixsurgeon.com/kb/how-to-dns-server-in-linux.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

