Tuesday 7 June 2011

DNS


Configuration of Domain Name Service (D.N.S.)

The DNS system allows us to set up different parts of this database on different servers around the world. If a DNS server does not have the answer, you can configure it to ask other DNS servers for help.

Deamons:
1.         named

Configuration Files:
1.         /etc/named.conf
2.         /var/named/chroot/var/named/*****flu
3.         /var/named/chroot/var/named/*****rlu

(i)         For configure of DNS firstly install below RPM
# yum install bind+tab
# yum install bind-utils+tab
# yum install system-config-bind+tab
# yum install bind-chroot+tab
# yum install caching-nameserver+tab

(ii) Copy sample file.
# cp /usr/share/system-config-bind/profiles/default/named.conf /var/named/chroot/etc
(iii)
# vi /var/named/chroot/etc/named.conf            (For open the named.conf file)
Assign line no through :se nu then copy through ‘y 4’ line no. 20 to 23, paste through ‘p’ in line no. 60 and write in these Line no. 61. Zone “server name server.linux.com”
Line no. 62. type master;
                                    Line no. 63 file “linuxflu”
                                    Line no. 66 Zone “ ip of Server in reverse order Ex.100.168.192.in-addr.arpa.”
                                    Line no. 67 type master
                                    Line no. 68 file “linuxrlu”   

20 zone "." IN {
21   type hint;
22   file "named.ca";
23 };

61 zone "linux.com." IN {
62   type master;
63   file "linuxflu";
64 };
65
66 zone "100.168.192.in-addr.arpa." IN {
67   type master;
68   file "linuxrlu";
69 };
70 include "/etc/rndc.key";

Press Esc :wq!

Note:- in line no. 63 & 68 file name can be any but extension should be “flu” & “rlu”  
# cp /var/named/chroot/etc/named.conf /etc/named.conf
(iv)
# vim /etc/hosts       After open hosts file write ip of server and server name Ex.192.168.100.10            server.linux.com
(v)
# vim /etc/sysconfig/network                  After open the network file write hostname=servername
Ex:
hostname=server.linux.com
(vi)
# vim  /etc/resolv.conf                   After open the resolv.conf file write
nameserver <ip of server>           192.168.100.1
(vii)
# cd /var/named/chroot/var/named

named# cp named.local linuxflu
named# cp named.local linuxrlu

named# vim linuxflu                                 (After open flu file write below line)
IN SOA           server.linux.com. root.      (Here write server name instead of given
example with root)
IN NS             server.linux.com                 (Here also write server name instead of given
without root)
server   IN A 192.168.100.10                    (Here give in starting of the line server & IP of
server)

Example of *****flu file:
$TTL    86400
@       IN      SOA     server.linux.com. root.  (
                                      1997022700 ; Serial
                                      28800      ; Refresh
                                      14400      ; Retry
                                      3600000    ; Expire
                                      86400 )    ; Minimum
        IN      NS      server.linux.com
        IN      A       192.168.1.3
Fqdn.linux.com IN   A    192.168.1.1

named# vim linuxrlu                                 (After open rlu file write below line instead of
given example)
IN SOA           server.linux.com. root.      (Here write server name instead of given
example with root)
IN NS             server.linux.com.                (Here also write server name instead of given
without root)
10   IN PTR    server.linux.com.                (Here 10 is our last digit of IP address.)
Example of *****rlu file:
$TTL    86400
@       IN      SOA     server.linux.com. root.  (
                                      1997022700 ; Serial
                                      28800      ; Refresh
                                      14400      ; Retry
                                      3600000    ; Expire
                                      86400 )    ; Minimum
        IN      NS      server.linux.com.
3       IN      PTR     server.linux.com.
1.1.168.192   IN   PTR  fqdn.linux.com.

named)# chgrp named linuxflu
named)# chgrp named linuxrlu
named)# chown named linuxflu
named)# chown named linuxrlu                                   
named)#cd
# service network restart
# service named restart
# dig –x <IP add. of server>                     (If this command fired without any error it
means our named service restart and give you
an answer file.
# nslookup <IP add. of server>               (This command also use for check our named
configuration is ok)
                                 

Client Side Configuration:
# vi /etc/resolve.conf
            search         linux.com
     nameserver    192.168.1.3 or server.linux.com
Esc :wq


Creating Alias (C name):
# vi /var/named/chroot/var/named/*****flu
client    IN   A         192.168.1.10  (A record of “192.168.1.10”)
other     IN   CNAME     client        (C record of a “client”)

# vi /var/named/chroot/var/named/*****rlu
10        IN   PTR       client.linux.com


No comments:

Post a Comment

Boot to UEFI Mode or legacy BIOS mode

Boot to UEFI Mode or legacy BIOS mode Choose UEFI or legacy BIOS modes while installing Windows. After Windows is installed, if you nee...