Primary DNS Server Configuration Part-2HARDWARE NETWORKING LINUX SOFTWAREIt Tech Technology

It Tech Technology

COMPUTER HARDWARE NETWORKING

Breaking

Home Top Ad

Post Top Ad

Thursday, November 26, 2015

Primary DNS Server Configuration Part-2



Step-3: After complete the NIC configure you have to change the host name by following this command:

[[email protected] ~]# vi /etc/sysconfig/network

(Original File):

NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=localhost.localdomain

(Modified File):

NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=ns1



Step-4: Now Edit hosts file for host name resolution by following this command:

[[email protected] ~]# vi /etc/hosts

(Original File):

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain localhost

(Modified File):

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain localhost

210.207.201.1   ns1.alphabd.net      ns1



Step-5: Copy & Rename the named.rfc1912.zones file to named.conf file & Change the ownership & permission by following this command:

[[email protected] ~]# cd /var/named/chroot/etc/
[[email protected] etc]# cp named.rfc1912.zones  named.conf
[[email protected] etc]# chown root:named named.conf
[[email protected] etc]# chmod 777 named.conf

Now Create A Link into /etc directory of named.conf then edit.

[[email protected] etc]# ln –s /var/named/chroot/etc/named.conf  /etc/named.conf
[[email protected] ~]# vi /etc/named.conf


Original File:

// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
zone "." IN {
     type hint;
     file "named.ca";
};

zone "localdomain" IN {
     type master;
     file "localdomain.zone";
     allow-update { none; };
};

zone "localhost" IN {
     type master;
     file "localhost.zone";
     allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
     type master;
     file "named.local";
     allow-update { none; };
};

zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
        type master;
     file "named.ip6.local";
     allow-update { none; };
};

zone "255.in-addr.arpa" IN {
     type master;
     file "named.broadcast";
     allow-update { none; };
};

zone "0.in-addr.arpa" IN {
     type master;
     file "named.zero";
     allow-update { none; };
};


Modified File:

// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
options {

     directory "/var/named";

};

zone "." IN {
     type hint;
     file "named.ca";
};

zone "localdomain" IN {
     type master;
     file "localdomain.zone";
     allow-update { none; };
};

zone "localhost" IN {
     type master;
     file "localhost.zone";
     allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
     type master;
     file "named.local";
     allow-update { none; };
};

zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
        type master;
     file "named.ip6.local";
     allow-update { none; };
};

zone "255.in-addr.arpa" IN {
     type master;
     file "named.broadcast";
     allow-update { none; };
};

zone "0.in-addr.arpa" IN {
     type master;
     file "named.zero";
     allow-update { none; };
};

zone "alphabd.net" IN {
     type master;
     file "alphabd.fz";

};

zone "201.207.210.in-addr.arpa" IN {
     type master;
     file "alphabd.rz";
};

Post Bottom Ad