Professional Documents
Culture Documents
How To Configure DNS Server (RHEL-5) PDF
How To Configure DNS Server (RHEL-5) PDF
9850332133
Information :
Web : abc.com
192.168.100.5
Primary DNS Secondary DNS Web : abc.com
(Your Machine) (Other Machine) 192.168.100.6
192.168.100.8 192.168.100.254
station8 station254 MX-1 : abc.com
172.16.0.5
chat.abc.com
10.0.0.7
You will be
creating DNS
Server Here
Solution :
Step 1 : Installation
Install following packages in your machine using rpm or yum tool
# rpm -ivh bind-9.3.3-7.el5.i386.rpm
# rpm -ivh caching-nameserver-9.3.3-7.el5.i386.rpm
# rpm -ivh bind-chroot-9.3.3-7.el5.i386.rpm
Step 2 : Start the DNS Server, verify it is working and setup your machine as client
Start tne DNS server using service command and using chkconfig make it to run on
runlevels 2 3 4 5 as below.
# service named restart
# chkconfig --level 2345 bind on
Verify activity on Port No. 53
# lsof -i :53
/var/named/chroot/etc/named.caching-nameserver.conf
This file contains following block where recursion for localhost is set on.
view localhost_resolver {
match-clients { localhost; };
match-destinations { localhost; };
recursion yes;
include "/etc/named.rfc1912.zones";
};
/var/named/chroot/etc/named.caching-nameserver.conf
// view localhost_resolver {
// match-clients { localhost; };
// match-destinations { localhost; };
// recursion yes;
// include "/etc/named.rfc1912.zones";
// };
By commenting listen-on port 53 { 127.0.0.1; }; we are making the posrt 53 open to all
interfaces. If you want specific the you can do like this
We are also commenting the view localhost_resolver { } Block so that query can made from
interfaces other than localhost.
Also make sure comment and few more things to make this DNS server public.
a] Comment allow-query { localhost; }; in options block
b] Add recursion yes; in options block
c] Also add include "/etc/named.rfc1912.zones"; at the end of file.
options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
query-source port 53;
recursion yes;
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
include "/etc/named.rfc1912.zones";
zone "example.com" IN {
type master;
file "example.com.zone" ;
};
zone "abc.com" IN {
type master;
file "abc.com.zone" ;
};