DNS – Domain Name System configuration Server Setup in RHEL5 named.conf

Service name is named.
It has the three configuration file named.conf,Forward.zone ,reverse.zone.first install DNS by through following command
[root@rhel5 ~]# yum install bind* cachi*
After edit the configuration file
/var/named/chroot/etc/named.conf
options
{
directory "/var/named";
};
include "/etc/rndc.key";
zone "domainname.com" IN
{
type master;
file "forward.zone";
allow-update { none; };
};
zone "0.168.192.in-addr.arpa" IN
{
type master; 
file "reverse.zone"; 
allow-update { none; };
};
Then edit forward.zone and reverse.zone file located in /var/named/chroot/var/named
Refer forward.zone and reverse.zone screen shot below .
Forward Zone Syntax
Host Name   IN(internet)   A(Address)   IP ADDRESS
Reverse Zone Syntax
IP ADDRESS  IN(internet)   PTR(Pointer)   Host Name
DNS – Domain Name System configuration Server Setup in RHEL5 Forward.zone DNS – Domain Name System configuration Server Setup in RHEL5 reverse.zone
Go to the /etc/resolv.conf file give the DNS server name and ip address in client.
Search rhel5.com
Nameserver 192.168.0.1

Then add host /etc/hosts
After configuration  restart the named service.

NOTE:In The REAL TIME, From ISP Under Proxy setting if we are not properly configured DNS.then we will get the following error message.
Error 1) error: Download error: (-2, 'Name or service not known')
Error 2) error: Download error: (-3, 'Temporary failure in name resolution')
Error 3) Ping unknown host.
Enter Create DNS Name server IP in /etc/resolve.conf

Related post