Domain Name Service


Domain name service 


The Domain Name System (DNS) is the phone book of the Internet. Humans access information online through domain names, like google.com or amazon.com. Web browsers interact through Internet Protocol (IP) addresses. DNS translates domain names to IP addresses so browsers can load Internet resources.

here we will configure some major types of DNS

                                              ITERATIVE DNS:-


SERVER SIDE:-
IP ADDRESS:-192.168.1.129

step1:

install bind in server side.

 # yum install bind bind-utils

open the configuration file of bind and do below changes.

# vi /etc/named.conf
//inside this edit on these particular lines and save it:-

// 14         listen-on port 53 { 192.168.1.129; };
//22         allow-query     { any; };

Step 2:

restart the services of bind

# cd /var/named
# systemctl start named
# netstat -puna|more
# iptables -F

-----------------------------------------------------------------------------------------------
now we will configure the DNS in client side 


client side:-
IP ADDRESS-192.168.1.150

Step 1:


add the server IP address in the resolv file

# vi /etc/resolv.conf

//under this u have to edit:
nameserver 192.168.1.129


Step 2:


now test the DNS query in client side machine

# nslookup
//under this we give a :
server 192.168.1.129
www.google.in

we configured the ITERATIVE DNS 

*********************************************************************************


CREATING AUTHORIZED DNS ITERATVE SERVER




SERVER SIDE:-
IP ADDRESS:-192.168.1.129

continue the below steps followed by the Iterative server 

Step 1:


open the configuration file and add the below text.

# vi /etc/named.conf

//under this we have to edit few lines after zone:
     60 zone "thor.in" IN {
     61         type master;
     62         file "hulk";
     63 };


Step 2:


# cd /var/named

create an text file and add the below data.

# vi hulk
//under this:-

thor.in.      3600    IN      SOA     thor.in.      root.thor.in (
                                                        29032019;
                                                        1D;
                                                        1H;
                                                        3H;
                                                        1H;
                                                        )
thor.in.      3600    IN      NS      ns.thor.in.
ns.thor.in.   3600    IN      A       192.168.1.129
www.thor.in.  3600    IN      A       192.168.1.150
     

Step 3:


restart the services                                                 

# chown named:named hulk
# systemctl stop named
# systemctl start named
# netstat -puna|more
# iptables -F


----------------------------------------------------------------------

CLIENT SIDE:-
IP ADDRESS:-192.168.1.150

Step 1:

open an the resolv configuration file , and add the server IP.

# vi /etc/resolv.conf

//under this u have to edit:
nameserver 192.168.1.129

Step 2:

Testing 

# nslookup
//under this we give a:
server 192.168.1.129
set type=NS
thor.in
set type=A
www.thor.in


now we configured the  AUTHORIZED DNS ITERATVE SERVER



*********************************************************************


DNS  mail server without tg


master side:-
ip address-192.168.1.129

Step 1:

open the configuration file and add some below lines.

# vi /etc/named.conf

//edit these lines:

60 zone "thor.in" IN {
61         type master;
62         file "hulk";
63 };

Step 2:


# cd /var/named

# vi hulk

thor.in.      3600    IN      SOA     thor.in.      root.thor.in. (
                                                        29032019;
                                                        1D;
                                                        1H;
                                                        3H;
                                                        1H;
                                                        )
thor.in.      3600    IN      NS      ns.thor.in.
thor.in       3600    IN      NS      ns1.thor.in
ns.thor.in.   3600    IN      A       192.168.1.129
ns1.thor.in   3600    IN      A       192.168.1.150
www.thor.in.  3600    IN      A       192.168.1.181

Step 3;


restart the services.

# systemctl restart named

# chown named:named hulk

--------------------------------------------------------------------------------------

client side:-
slave side-192.168.1.150

Step 1;


# vi /etc/named.conf
//edit this

zone "thor.in" IN {
type slave;
masters {192.168.1.129;};
file "hulk";
};

Step 2;


# systemctl restart named

here you can see the messages
# less/var/log/messages

Step 3:


testing 
# nslookup
server 192.168.1.150
set type=NS
thor.in
set type=A
ns.thor.in


*********************************************************************

Allow Permission To Slave without TS:-


master side:
ip address-192.168.1.129


Step 1;


# vi /etc/named.conf

//edit these lines:

60 zone "thor.in" IN {
61         type master;
62         file "hulk";
63    allow-transfer {192.168.1.150;};
64 };


Step 2:


# cd /var/named

# vi hulk

thor.in.      3600    IN      SOA     thor.in.      root.thor.in. (
                                                        59032019;
                                                        1D;
                                                        1H;
                                                        3H;
                                                        1H;
                                                        )
thor.in.      3600    IN      NS      ns.thor.in.
thor.in       3600    IN      NS      ns1.thor.in
ns.thor.in.   3600    IN      A       192.168.1.129
ns1.thor.in   3600    IN      A       192.168.1.150
www.thor.in.  3600    IN      A       192.168.1.181


Step 3:

restart the services.

# systemctl restart named

# chown named:named hulk


-------------------------------------------------------------------------------------
slave side:-

ip address:-192.168.1.150

Step 1:

# vi /etc/named.conf
//edit this:-

zone "thor.in" IN {
type slave;
masters {192.168.1.129;};
file "hulk";
};

Step 2 ;

restart the services.
# systemctl restart named

to check the logs 
# less/var/log/messages

Testing 
# nslookup
server 192.168.1.150
set type=NS
thor.in
set type=A
ns.thor.in





THANK YOU !!! 

Comments