GIT – Stands for Domain Name Service. A server hosts the information that enables client computers to resolve memorable, alphanumeric names to the IP addresses that computers use to communicate with each other.

Configure the static IP on this machine

auto eth0
iface eth0 inet static
address 192.168.145.131
netmask 255.255.255.0
network 192.168.145.0
broadcast 192.168.145.255
gateway 192.168.145.2

Remove the Network-Manager utility using the following command

apt-get remove network-manager network-manager-gnome

Only six steps follow for the configure DNS-BIND

Step1:    the bind using the following command

sudo apt-get install bind9 dnsutils

Step2:    We will edit named.conf.local file

sudo vi /etc/bind/named.conf.local

Add the following lines in named.conf.local

zone “testqasim123.com”
{
type master;
file “/etc/bind/zones/testqasim123.com.db”;
};

# This is the zone definition for reverse DNS. replace 0.168.192 with your network address in reverse notation – e.g my network address is 192.168.0

zone “0.168.192.in-addr.arpa”
{
type master;
file “/etc/bind/zones/rev.0.168.192.in-addr.arpa”;
};

Step3:    We need to modify the forwarder.

sudo vi /etc/bind/named.conf.options

forwarders {
# Replace the address below with the address of your provider’s DNS server or use the open DNS
123.123.123.123;
8.8.8.8;
8.8.4.4;
};

Step4:    Add the zone definition files
Create the directory using the following command

sudo mkdir /etc/bind/zones
create the database file
sudo vi /etc/bind/zones/ testqasim123.com.db

The zone definition file is where we will put all the addresses / machine names that our DNS server will know. Testqasim123.com.db zone file as follows

$TTL 3D
@ IN SOA qasim.testqasim123.com. admin.testqasim123.com. (
2007031001;
28800;
3600;
604800;
38400
);

testqasim123.com.       IN      NS      qasim.testqasim123.com.
qasim                   IN      A       192.168.145.131
mta                     IN      A       192.168.145.131

Create Reverse DNS Zone file
Step5:    Create the reverse zone file

sudo vi /etc/bind/zones/rev.0.168.192.in-addr.arpa
Rev.0.168.192.in-addr.arpa zone file as follows

$TTL 3D
@ IN SOA qasim.testqasim123.com. admin.testqasim123.com. (
2007031001;
28800;
604800;
604800;
86400
);

131             IN      NS      qasim.testqasim123.com.
131             IN      PTR    mail.testqasim123.com.

Finally last step
Add the following lines in /etc/resolv.conf

sudo vi  /etc/resolv.conf
search testqasim123.com.
nameserver 192.168.145.131

Restart the DNS services

/etc/init.d/bind9 restart

Test your DNS Using the following command

nslookup

Type the domain name and you look

qasim.testqasim123.com
Server:         192.168.145.131
Address:        192.168.145.131#53
Name:   qasim.testqasim123.com
Address: 192.168.145.131

Print Friendly

Comments

comments

Bài viết liên quan