<?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>WEB-NES-BAY &#187; name server in ubuntu</title>
	<atom:link href="http://webnesbay.com/tag/name-server-in-ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://webnesbay.com</link>
	<description>Learn Tips and tricks on Linux, Hacking, linux, PHP, Perl, Web, Hardware</description>
	<lastBuildDate>Sun, 11 Apr 2010 05:12:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to setup a DNS server with bind in Ubuntu linux</title>
		<link>http://webnesbay.com/how-to-setup-a-dns-server-with-bind-in-ubuntu-linux/</link>
		<comments>http://webnesbay.com/how-to-setup-a-dns-server-with-bind-in-ubuntu-linux/#comments</comments>
		<pubDate>Sun, 20 Sep 2009 04:49:56 +0000</pubDate>
		<dc:creator>WEBNESBAY</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Arpa]]></category>
		<category><![CDATA[Dns Bind]]></category>
		<category><![CDATA[Dns Linux]]></category>
		<category><![CDATA[Dns Server]]></category>
		<category><![CDATA[domain name]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[Machine Names]]></category>
		<category><![CDATA[Name Server]]></category>
		<category><![CDATA[name server in ubuntu]]></category>
		<category><![CDATA[named.conf]]></category>
		<category><![CDATA[Network Address]]></category>
		<category><![CDATA[New Domain Names]]></category>
		<category><![CDATA[Options]]></category>
		<category><![CDATA[resolv.conf]]></category>
		<category><![CDATA[Reverse Dns]]></category>
		<category><![CDATA[Server Example]]></category>
		<category><![CDATA[setup dns server]]></category>
		<category><![CDATA[Source Code]]></category>
		<category><![CDATA[webhosting]]></category>

		<guid isPermaLink="false">http://webnesbay.com/?p=791</guid>
		<description><![CDATA[This is  a simple article to setup a DNS Server in Ubuntu. Please follow the steps to make this.  Setting up DNS Server is used to serve the new domain names using your IP. This is kind of providing webhosting.
Step1: We need to install bind 9 for this
sudo apt-get install bind9
Step 2: Configure the main Bind files. Usually, if you install Bind from the source code, you will have to edit the file named.conf. However, Ubuntu provides you with a [...]


Related posts:<ol><li><a href='http://webnesbay.com/apache-subdomain-configuration/' rel='bookmark' title='Permanent Link: Apache Subdomain Configuration'>Apache Subdomain Configuration</a></li>
<li><a href='http://webnesbay.com/bluetooth-personal-area-network-in-ubuntu/' rel='bookmark' title='Permanent Link: Bluetooth personal area network in ubuntu'>Bluetooth personal area network in ubuntu</a></li>
<li><a href='http://webnesbay.com/how-to-block-websites-in-ubuntu-linux/' rel='bookmark' title='Permanent Link: How to block websites in Ubuntu Linux'>How to block websites in Ubuntu Linux</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This is  a simple article to setup a DNS Server in Ubuntu. Please follow the steps to make this.  Setting up DNS Server is used to serve the new domain names using your IP. This is kind of providing webhosting.</p>
<p><strong>Step1:</strong> We need to install bind 9 for this</p>
<p><span style="color: #0000ff;">sudo apt-get install bind9</span></p>
<p><strong>Step 2: </strong>Configure the main Bind files. Usually, if you install Bind from the source code, you will have to edit the file named.conf. However, Ubuntu provides you with a pre-configured Bind, so we will edit another file:</p>
<p><span style="color: #0000ff;">sudo vi /etc/bind/named.conf.local</span></p>
<p>This is where we will insert our zones. By the way, a zone is a domain name that is referenced in the DNS server<br />
Insert this in the named.conf.local file:</p>
<p><span style="color: #0000ff;"># This is the zone definition. replace example.com with your domain name<br />
zone &#8220;example.com&#8221; {<br />
type master;<br />
file &#8220;/etc/bind/zones/example.com.db&#8221;;<br />
};<br />
</span><br />
<span style="color: #0000ff;"># This is the zone definition for reverse DNS. replace 1.168.192 with your network address in reverse notation &#8211; e.g my network address is 192.168.1<br />
zone &#8220;0.168.192.in-addr.arpa&#8221; {<br />
type master;<br />
file &#8220;/etc/bind/zones/rev.0.168.192.in-addr.arpa&#8221;;<br />
};<br />
</span><br />
Ok, now, let&#8217;s edit the options file:</p>
<p><span style="color: #0000ff;">sudo vi /etc/bind/named.conf.options</span></p>
<p>We need to modify the forwarder. This is the DNS server to which your own DNS will forward the requests<br />
<span style="color: #0000ff;"><br />
forwarders {<br />
# Replace the address below with the address of your provider&#8217;s DNS server<br />
100.100.100.100;<br />
};</span></p>
<p>Now, let&#8217;s add the zone definition files (replace example.com with your domain name:</p>
<p><span style="color: #0000ff;">sudo mkdir /etc/bind/zones<br />
sudo vi /etc/bind/zones/example.com.db<br />
</span><br />
The zone definition file is where we will put all the addresses / machine names that our DNS server will know. You can take the following example for your keen understanding<br />
<span style="color: #0000ff;"><br />
// replace example.com with your <strong>domain name.</strong> do not forget the<strong> .</strong> after the domain name!<br />
// Also, replace ns1 with the name of your DNS server<br />
example.com.      IN      SOA     ns1.example.com. admin.example.com. (<br />
// Do not modify the following lines!<br />
2006081401<br />
28800<br />
3600<br />
604800<br />
38400<br />
)</span><br />
<span style="color: #0000ff;"><br />
// Replace the following line as necessary:<br />
// ns1 = DNS Server name<br />
// mta = mail server name<br />
// example.com = domain name<br />
example.com.      IN      NS              ns1.example.com.<br />
example.com.      IN      MX     10       mta.example.com.</span></p>
<p>// Replace the IP address with the right IP addresses.<br />
www              IN      A       192.168.0.2<br />
mta              IN      A       192.168.0.3<br />
ns1              IN      A       192.168.0.1</p>
<p>Now, let&#8217;s create the reverse DNS zone file:<br />
<span style="color: #0000ff;">sudo vi /etc/bind/zones/rev.0.168.192.in-addr.arpa</span></p>
<p>Copy and paste the following text, modify as needed:<br />
<span style="color: #0000ff;"><br />
//replace example.com with yoour domain name, ns1 with your DNS server name.<br />
// The number before IN PTR example.com is the machine address of the DNS server. in my case, it&#8217;s 1, as my IP address is 192.168.0.1.<br />
@ IN SOA ns1.example.com. admin.example.com. (<br />
2006081401;<br />
28800;<br />
604800;<br />
604800;<br />
86400<br />
)</span></p>
<p>IN    NS     ns1.example.com.<br />
1                    IN    PTR    example.com</p>
<p>Ok, now you just need to restart bind:</p>
<p><span style="color: #0000ff;">sudo /etc/init.d/bind9 restart</span></p>
<p>Now lets test our DNS Server<br />
<strong>Step 4:</strong></p>
<p>Modify the file resolv.conf with the following settings:</p>
<p><span style="color: #0000ff;">sudo vi /etc/resolv.conf</span></p>
<p>enter the following:</p>
<p><span style="color: #0000ff;">// replace example.com with your domain name, and 192.168.0.1 with the address of your new DNS server.<br />
search example.com<br />
nameserver 192.168.0.1</span></p>
<p>Now, test your DNS:</p>
<p>dig example.com</p>
<p>Look at the result&#8230;. Enjoy! <img src='http://webnesbay.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>If you have any problems just post it in comments</p>


<p>Related posts:<ol><li><a href='http://webnesbay.com/apache-subdomain-configuration/' rel='bookmark' title='Permanent Link: Apache Subdomain Configuration'>Apache Subdomain Configuration</a></li>
<li><a href='http://webnesbay.com/bluetooth-personal-area-network-in-ubuntu/' rel='bookmark' title='Permanent Link: Bluetooth personal area network in ubuntu'>Bluetooth personal area network in ubuntu</a></li>
<li><a href='http://webnesbay.com/how-to-block-websites-in-ubuntu-linux/' rel='bookmark' title='Permanent Link: How to block websites in Ubuntu Linux'>How to block websites in Ubuntu Linux</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://webnesbay.com/how-to-setup-a-dns-server-with-bind-in-ubuntu-linux/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
