######################## DNS CONFIGURATION ########
1. DNS Server Name: rhel5test.linux.com (192.168.1.21) ; domain: linux.com
2. Download and Install Packages related to bind:
yum install bind*
bind-utils, bind-sdb, bind-libs, bind-9.3, bind-chroot, bind-libbind-devel
yum install caching-nameserver
3. Configure : name.conf file ( main configuration file )
cd /var/named/chroot/etc/
cp named.caching-nameserver.conf named.conf
vi named.conf
options {
listenon port 53 { 127.0.0.1; 192.168.1.21; };
listenonv6 port 53 { ::1; };
directory “/var/named”;
dumpfile “/var/named/data/cache_dump.db”;
statisticsfile “/var/named/data/named_stats.txt”;
listenon port 53 { 127.0.0.1; 192.168.1.21; };
listenonv6 port 53 { ::1; };
directory “/var/named”;
dumpfile “/var/named/data/cache_dump.db”;
statisticsfile “/var/named/data/named_stats.txt”;
memstatisticsfile “/var/named/data/
named_mem_stats.txt”;
querysource port 53;
allow-query { 127.0.0.1; 192.168.1.0/24; };
allowquery { 127.0.0.1; 192.168.1.0/24; };
allowtransfer { 127.0.0.1; 192.168.1.21; };
forwarders { 127.0.0.1; 192.168.1.21; };
forward only;
};
forward only;
};
logging {
channel default_debug {
file “data/named.run”;
severity dynamic;
};
channel default_debug {
file “data/named.run”;
severity dynamic;
};
};
view localhost_resolver {
matchclients { localhost; 192.168.1.0/24; };
matchclients { localhost; 192.168.1.0/24; };
matchdestinations { localhost; 192.168.1.0/24; };
recursion yes;
include “/etc/named.rfc1912.zones”;
};
include “/etc/named.rfc1912.zones”;
};
==> Copy named.conf to /etc/ dir
4. Configure Zone files
vi /etc/named.rfc1912.zones
zone “linux.com” IN {
type master;
file “linux.com.fzone”;
allow-update { none; };
allow-query { any; };
};
zone “1.168.192.in-addr.arpa” IN {
type master;
file “linux.come.reverse”;
allow-update { none; };
allow-query { any; };
};
5. cd /var/named/chroot/var/named ;; cp localhost.zone linux.com.fzone ;; cp named.local linux.come.reverse
6. Change ownership to root:named and permission to 755 for following files
Both zone files , named.conf (both at /etc/ and /var/named/chroot/etc/)
/etc/named.rfc1912.zones
7. Edit Forward zone file ( Take care of dots after fqdns )
$TTL 86400
@ IN SOA rhel5test.linux.com. root. rhel5test.linux.com. ( 42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
@ IN NS rhel5test.linux.com
@ IN SOA rhel5test.linux.com. root. rhel5test.linux.com. ( 42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
@ IN NS rhel5test.linux.com
.
rhel5test.linux.com. IN A 192.168.1.21
rhel5test.linux.com. IN A 192.168.1.21
rhel6test.linux.com. IN A 192.168.1.22 # Client
8. Edit Reverse Zone file (Take care of dots after fqdns )
$TTL 86400
@ IN SOA rhel5test.linux.com. rhel5test.linux.com. ( 1997022700 ; Serial
@ IN SOA rhel5test.linux.com. rhel5test.linux.com. ( 1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
@ IN NS rhel5test.linux.com.
21 IN PTR rhel5test.linux.com.
22 IN PTR rhel6test.linux.com. # Client
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
@ IN NS rhel5test.linux.com.
21 IN PTR rhel5test.linux.com.
22 IN PTR rhel6test.linux.com. # Client
9.. Check config file : service named configtest
10. Restart named services
11. Test DNS using dig server name ; dig -x server IP , nslookup
12 Client SIDE :: Make changes in /etc/resolv.conf ::: search linux.com
nameserver 192.178.1.21
Recent Comments