DNS Configuration in RHEL 5


DNS Configuration in RHEL 5
Step 1:
set static ipaddress by using these commands
system-config-network
or
ifconfig eth0 192.168.0.254

Step 2:

Install all these following rpms

rpm -ivh bind-9.3.3-7.el5.i386.rpm
rpm -ivh bind-devel-9.3.3-7.el5.i386.rpm
rpm -ivh bind-libbind-devel-9.3.3-7.el5.i386.rpm
rpm -ivh bind-libs-9.3.3-7.el5.i386.rpm
rpm -ivh bind-libbind-devel-9.3.3-7.el5.i386.rpm
rpm -ivh bind-libs-9.3.3-7.el5.i386.rpm
rpm -ivh bind-sdb-9.3.3-7.el5.i386.rpm
rpm -ivh caching-nameserver-9.3.3-7.el5.i386.rpm

Step 3:

cd /var/named/chroot/var/named/
cp localdomain.zone for.example.com
cp named.local rev.example.com
chown root:named for.example.com
chown root:named rev.example.com

Step 4:

Edit the following files and add the respective lines in those
vi /etc/sysconfig/network

vi /etc/sysconfig/network-scripts/ifcfg-eth0
peerdns=no

vi /etc/resolv.conf
search example.com
nameserver 192.168.0.254
vi /etc/hosts
cd /var/named/chroot/etc
cp named.caching-nameserver.conf named.conf
chown root:named named.conf
vi named.conf
option{
listen-on pot 53{127.0.0.1; 192.168.0.254;};

allow-query{ localhost; 192.168.0.0/24;}
match-clients {localhost; 192.168.0.0/24;};
match-destination {localhost; 192.168.0.0/24;};

vi /etc/named.rfc1912.zones
zone "example.com" IN {
type master;
allow-update {none;};
};
zone "0.168.192.in-addr.arpa" IN {
type master;
allow-update { none; };
};

Step 5:
Edit for.example.com and rev.example.com in the respective location /var/named/chroot/var/named
in the following way.

$TTL 86400
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum

server IN A 192.168.0.254
client8 IN A 192.168.0.108
client1 IN A 192.168.0.101
client2 IN A 192.168.0.102
client3 IN A 192.168.0.103
client4 IN A 192.168.0.104
client5 IN A 192.168.0.105
client6 IN A 192.168.0.106
client7 IN A 192.168.0.107



$TTL 86400
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
254 IN PTR server.example.com.
 
Step 6:
service named restart
chkconfig named on


if you get all the four sections question, answer,additional, authority as 1, you got it. Otherwise, some check the steps properly.

Step 7:
Client side: in station1.example.com
just touch these files with the existing details
vi /etc/resolv.conf
search example.com
nameserver 192.168.0.254
vi /etc/hosts

you should get the same sections like the server, Otherwise check the steps properly.
You might like:

No comments:

Post a Comment