<?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>master bind dns server Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/master-bind-dns-server/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Wed, 02 Dec 2020 21:12:57 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>How To Install and Configure Master BIND DNS Server On Ubuntu 20.04</title>
		<link>https://www.osradar.com/how-to-install-and-configure-master-bind-dns-server-on-ubuntu-20-04/</link>
					<comments>https://www.osradar.com/how-to-install-and-configure-master-bind-dns-server-on-ubuntu-20-04/#respond</comments>
		
		<dc:creator><![CDATA[sabi]]></dc:creator>
		<pubDate>Thu, 03 Dec 2020 04:47:00 +0000</pubDate>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[BIND DNS server configuration]]></category>
		<category><![CDATA[how to install bind dns server ubuntu 20.04]]></category>
		<category><![CDATA[how to tutorials]]></category>
		<category><![CDATA[master bind dns server]]></category>
		<category><![CDATA[ubuntu 20.04]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=25996</guid>

					<description><![CDATA[<p>Today we are going to learn that how to install and configure Master BIND DNS server on Ubuntu 20.04. As you all know that DNS provides the functionality of converting human readable domains to computer readable IP&#8217;s &#38; vice versa. So, it helps to translate the domain names. Here we&#8217;ll see that how we can [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-and-configure-master-bind-dns-server-on-ubuntu-20-04/">How To Install and Configure Master BIND DNS Server On Ubuntu 20.04</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Today we are going to learn that <a href="https://www.osradar.com/?p=25996" target="_blank" rel="noreferrer noopener">how to install and configure Master BIND DNS server on Ubuntu 20.04</a>. As you all know that DNS provides the functionality of converting human readable domains to computer readable IP&#8217;s &amp; vice versa. So, it helps to translate the domain names. Here we&#8217;ll see that how we can install &amp; configure Master BIND DNS Server On Ubuntu 20.04.</p>



<p>Before proceeding towards the installation procedure, make sure your system has a static IP configured.</p>



<h2>Step 1: Update Your System</h2>



<p>Before installing any new package, make sure your system is up-to date.</p>



<pre class="wp-block-preformatted">sudo apt -y update</pre>



<h3>Step 2: Download &amp; Install the BIND DNS Server</h3>



<p>Run the below command to install the bind dns server and required packages.</p>



<pre class="wp-block-preformatted">sudo apt install -y bind9 bind9utils bind9-doc dnsutils</pre>



<h3>Step 3: Configure DNS Server</h3>



<p>Main configuration directory of DNS is located at <strong>/etc/bind</strong>.</p>



<p>Global DNS configuraiton file can be found at <strong>/etc/bind/named.conf</strong> that can&#8217;t be used for local DNS. For local DNS, <strong>/etc/bind/named.conf.local</strong> is used.</p>



<h4>Create Zones</h4>



<p>Edit the local DNS file with your favourite editor.</p>



<pre class="wp-block-preformatted">sudo nano /etc/bind/named.conf.local</pre>



<p>And then create forward &amp; reverse zones for your domain. Here I&#8217;ll create for <a href="http://osradar.com" target="_blank" rel="noreferrer noopener">osradar.com</a> as seen below:</p>



<pre class="wp-block-preformatted">zone "osradar.local" IN { // Domain name

type master; // Primary DNS

file "/etc/bind/forward.osradar.local.db"; // Forward lookup file

allow-update { none; }; // Since this is the primary DNS, it should be none.

};</pre>



<p>That was for the forward zone. Now, we&#8217;ll add for reverse zone.</p>



<pre class="wp-block-preformatted">zone "10.16.172.in-addr.arpa" IN { //Reverse lookup name, should match your network in reverse order

type master; // Primary DNS

file "/etc/bind/reverse.osradar.local.db"; //Reverse lookup file

allow-update { none; }; //Since this is the primary DNS, it should be none.

};</pre>



<p><strong>10.16.172.in-addr.arpa is the zone name of reverse DNS. (If network is 172.16.10.0, the name will be reversed as in 10.16.172).</strong></p>



<h3>Step 4: Configure Bind DNS Zone Lookup Files</h3>



<p>As described earlier, the zone lookup files have the DNS records of the forward &amp; reverse zones. So, we&#8217;ll configure them.</p>



<h5>For Forward Zone Lookup File</h5>



<p>Now, copy the sample forward zone lookup file to the file called <strong>forward.osradar.local.db</strong> located at <strong>/etc/bind </strong>directory.</p>



<pre class="wp-block-preformatted">sudo cp /etc/bind/db.local /etc/bind/forward.osradar.local.db</pre>



<p>Now, edit the above file.</p>



<pre class="wp-block-preformatted">sudo nano /etc/bind/forward.osradar.local.db</pre>



<pre class="wp-block-preformatted">$TTL 604800
@ IN SOA ns1.osradar.local. root.ns1.osradar.local. (
3 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
;@ IN NS localhost.
;@ IN A 127.0.0.1
;@ IN AAAA ::1

;Name Server Information

@ IN NS ns1.osradar.local.

;IP address of Name Server

ns1 IN A 172.16.10.2

;Mail Exchanger

osradar.local. IN MX 10 mail.osradar.local.

;A – Record HostName To Ip Address

www IN A 172.16.10.3
mail IN A 172.16.10.4

;CNAME record

ftp IN CNAME www.osradar.local.</pre>



<h5>For Reverse Zone Lookup File</h5>



<p>Simply perform the above actions for reverse zone lookup file.</p>



<pre class="wp-block-preformatted">sudo cp /etc/bind/db.127 /etc/bind/reverse.osradar.local.db</pre>



<p>And then modify the content.</p>



<pre class="wp-block-preformatted">sudo nano /etc/bind/reverse.osradar.local.db</pre>



<pre class="wp-block-preformatted">;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA osradar.local. root.osradar.local. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;

;Name Server Information

@ IN NS ns1.osradar.local.
ns1 IN A 172.16.10.2

;Reverse lookup for Name Server

2 IN PTR ns1.osradar.local.

;PTR Record IP address to HostName

3 IN PTR www.osradar.local.
4 IN PTR mail.osradar.local.</pre>



<h3>Step 5: Verify Bind DNS Syntax</h3>



<p>Hit the given command to verify the syntax of bind DNS it&#8217;ll return to the shell if everything is ok.</p>



<pre class="wp-block-preformatted">sudo named-checkconf</pre>



<p>Fire the below commands to check the syntax for forward &amp; reverse zones respectively.</p>



<pre class="wp-block-preformatted">sudo named-checkzone osradar.local /etc/bind/forward.osradar.local.db
sudo named-checkzone 10.16.172.in-addr.arpa /etc/bind/reverse.osradar.local.db</pre>



<p>You&#8217;ll see the similar output respectively.</p>



<pre class="wp-block-preformatted">#####forward zone file
OK
#####reverse zone file
zone 10.16.172.in-addr.arpa/IN: loaded serial 1
OK</pre>



<p>Finally, restart &amp; enable BIND services.</p>



<pre class="wp-block-preformatted">sudo systemctl restart bind9<br>sudo systemctl enable bind9</pre>



<h3>Step 6: Test DNS Server On Ubuntu 20.04</h3>



<p>We can change the DNS server on any of client machine to our newly created server. Every OS has different DNS settings. In Ubuntu type</p>



<pre class="wp-block-preformatted">sudo echo "nameserver 172.16.10.2" &gt;&gt; /etc/resolv.conf</pre>



<p>Now, type <strong>dig</strong> command along with your domain name to test the DNS server.</p>



<pre class="wp-block-preformatted">root@ubuntu20:~# dig www.osradar.local

; &lt;&lt;&gt;&gt; DiG 9.16.1-Ubuntu &lt;&lt;&gt;&gt; www.osradar.local
;; global options: +cmd
;; Got answer:
;; WARNING: .local is reserved for Multicast DNS
;; You are currently testing what happens when an mDNS query is leaked to DNS
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 65241
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: fabd20125b9ccbff010000005f8c7204e1387a993d58c22f (good)
;; QUESTION SECTION:
;www.osradar.local. IN A

;; ANSWER SECTION:
www.osradar.local. 604800 IN A 172.16.10.3

;; Query time: 4 msec
;; SERVER: 172.16.10.10#53(172.16.10.10)
;; WHEN: Sat Nov 28 16:49:08 UTC 2020
;; MSG SIZE rcvd: 100

</pre>



<p>And to test the reverse DNS, type</p>



<pre class="wp-block-preformatted">root@ubuntu:~# dig -x 172.16.10.3

; &lt;&lt;&gt;&gt; DiG 9.16.1-Ubuntu &lt;&lt;&gt;&gt; -x 172.16.10.3
;; global options: +cmd
;; Got answer:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 62529
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 7b8c9b8971f74afc010000005f8c72a8bdc5ebbdb4869578 (good)
;; QUESTION SECTION:
;3.10.16.172.in-addr.arpa. IN PTR

;; ANSWER SECTION:
3.10.16.172.in-addr.arpa. 604800 IN PTR www.osradar.local.

;; Query time: 0 msec
;; SERVER: 172.16.10.10#53(172.16.10.10)
;; WHEN: Sat Nov 28 16:51:52 UTC 2020
;; MSG SIZE rcvd: 122

</pre>



<p>So, you can see that both forward &amp; reverse DNS are working properly. Hence, this is how you can install &amp; Configure BIND DNS Server On Ubuntu 20.04</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-and-configure-master-bind-dns-server-on-ubuntu-20-04/">How To Install and Configure Master BIND DNS Server On Ubuntu 20.04</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-install-and-configure-master-bind-dns-server-on-ubuntu-20-04/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
