*Step By Step Configuration of DNS*
-----------------------------------
[root@server1 ~]# yum install bind*
[root@server1 ~]# yum install caching-nameserver
[root@server1 ~]# cd /var/named/chroot
[root@server1 chroot]# cd etc
[root@server1 etc]# cp named.caching-nameserver.conf named.conf
[root@server1 etc]# cat named.rfc1912.zones >> named.conf
[root@server1 etc]# chgrp named named.conf
[root@server1 etc]# vi named.conf
Change the following lines
--------------------------
.
.
listen-on port 53 { 192.168.1.12; }; //ip adderss of the system
.
.
.
.
allow-query { 192.168.1.0/24; }; //Network address
.
.
Make comment of these lines
---------------------------
// logging {
// channel default_debug {
// file "data/named.run";
// severity dynamic;
// };
// };
// view localhost_resolver {
// match-clients { localhost; };
// match-destinations { localhost; };
// recursion yes;
// include "/etc/named.rfc1912.zones";
// };
Add the following lines
-----------------------
zone "example.com" IN {
type master;
file "forward.zone";
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "reverse.zone";
};
Save and exit the file
----------------------
:wq
[root@server1 etc]# cd ../var/named
[root@server1 named]# cp localdomain.zone forward.zone
[root@server1 named]# cp named.local reverse.zone
[root@server1 named]# chgrp named forward.zone
[root@server1 named]# chgrp named reverse.zone
[root@server1 named]# vi forward.zone
Original File
---------------
1 $TTL 86400
2 @ IN SOA localhost root (
3 42 ; serial (d. adams)
4 3H ; refresh
5 15M ; retry
6 1W ; expiry
7 1D ) ; minimum
8 IN NS localhost
9 localhost IN A 127.0.0.1
Modified File
-------------
1 $TTL 86400
2 @ IN SOA server1 root (
3 ------- 42 ; serial (d. adams)
4 3H ; refresh
5 15M ; retry
6 1W ; expiry
7 1D ) ; minimum
8 IN NS server1
9 IN A 192.168.1.12
10 server1 IN A 192.168.1.12
[root@server1 named]# vi reverse.zone
Original File
---------------
1 $TTL 86400
2 @ IN SOA localhost. root.localhost. (
3 1997022700 ; Serial
4 28800 ; Refresh
5 14400 ; Retry
6 3600000 ; Expire
7 86400 ) ; Minimum
8 IN NS localhost.
9 1 IN PTR localhost.
Modified File
-------------
1 $TTL 86400
2 @ IN SOA server1.example.com. root.server1.example.com. (
3 1997022700 ; Serial
4 28800 ; Refresh
5 14400 ; Retry
6 3600000 ; Expire
7 86400 ) ; Minimum
8 IN NS server1.example.com.
9 12 IN PTR server1.example.com.
[root@server1 named]# vi /etc/resolv.conf
Add this line
-------------
nameserver 192.168.1.12
[root@server1 named]# service named restart
[root@server1 named]# chkconfig named on
[root@server1 named]# dig server1.example.com
; <<>> DiG 9.3.4-P1 <<>> server1.example.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 65231
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;server1.example.com. IN A
;; ANSWER SECTION:
server1.example.com. 86400 IN A 192.168.1.12
;; AUTHORITY SECTION:
example.com. 86400 IN NS server1.example.com.
;; Query time: 1 msec
;; SERVER: 192.168.1.53#53(192.168.1.12)
;; WHEN: Mon Aug 24 18:58:05 2009
;; MSG SIZE rcvd: 67
[root@server1 named]# dig -x 192.168.1.12
; <<>> DiG 9.3.4-P1 <<>> -x 192.168.1.12
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29761
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
;; QUESTION SECTION:
;12.1.168.192.in-addr.arpa. IN PTR
;; ANSWER SECTION:
12.1.168.192.in-addr.arpa. 86400 IN PTR server1.example.com.
;; AUTHORITY SECTION:
1.168.192.in-addr.arpa. 86400 IN NS server1.example.com.
;; ADDITIONAL SECTION:
server1.example.com. 86400 IN A 192.168.1.12
;; Query time: 0 msec
;; SERVER: 192.168.1.12#53(192.168.1.12)
;; WHEN: Mon Aug 24 18:58:53 2009
;; MSG SIZE rcvd: 106
[root@server1 named]# host 192.168.1.12
12.1.168.192.in-addr.arpa domain name pointer server1.example.com.
[root@server1 named]# host server1.example.com
server1.example.com has address 192.168.1.12
[root@server1 named]# nslookup
> 192.168.1.12
Server: 192.168.1.12
Address: 192.168.1.12#53
12.1.168.192.in-addr.arpa name = server1.example.com.
> server1.example.com
Server: 192.168.1.12
Address: 192.168.1.12#53
Name: server1.example.com
Address: 192.168.1.12
> exit
[root@server1 named]#
** Now Step By Step Configuration of Slave DNS Server **
Before Configure the Slave DNS, Master & Slave computers are should be synchronize with Date/Time
(Means Both computer have same date and time)
Steps needed in Master Computer
-------------------------------
[root@server1 ~]# cd /var/named/chroot
[root@server1 chroot]# cd etc
[root@server1 etc]# vi named.conf
then add the following line
---------------------------
options {
.
.
.
allow-transfer { 192.168.1.53; }; // the ip address of Slave machine
.
.
.
};
save and exit
:wq
[root@server1 etc]# cd ../var/named
[root@server1 named]# vi forward.zone
then add the IN NS and A entry as follows
-----------------------------------
IN NS station1
IN A 192.168.1.53
station1 IN A 192.168.1.53
save and exit
:wq
[root@server1 named]# vi reverse.zone
then add the IN NS and PTR entry as follows
-----------------------------------
IN NS station1.example.com.
53 IN PTR station1.example.com.
save and exit
:wq
Steps needed in Slave Computer
-------------------------------
[root@station1 ~]# yum install bind*
[root@station1 ~]# yum install caching-nameserver
[root@station1 ~]# cd /var/named/chroot
[root@station1 chroot]# cd etc
[root@station1 etc]# cp named.caching-nameserver.conf named.conf
[root@station1 etc]# cat named.rfc1912.zones >> named.conf
[root@station1 etc]# chgrp named named.conf
[root@station1 etc]# vi named.conf
Change the following lines
--------------------------
.
.
listen-on port 53 { 192.168.1.53 }; //ip adderss of the system
.
.
.
.
allow-query { 192.168.1.0/24; }; //Network address
.
.
Make comment of these lines
---------------------------
// logging {
// channel default_debug {
// file "data/named.run";
// severity dynamic;
// };
// };
// view localhost_resolver {
// match-clients { localhost; };
// match-destinations { localhost; };
// recursion yes;
// include "/etc/named.rfc1912.zones";
// };
Add the following lines
-----------------------
zone "example.com" IN {
type slave;
masters { 192.168.1.12; };
file "slaves/forward.zone";
};
zone "1.168.192.in-addr.arpa" IN {
type slave;
masters { 192.168.1.12; };
file "slaves/reverse.zone";
};
Save and exit the file
----------------------
:wq
[root@station1 named]# vi /etc/resolv.conf
Add this line
-------------
nameserver 192.168.1.12
[root@station1 named]# service named restart
[root@station1 named]# chkconfig named on
--
You received this message because you are subscribed to the Google Groups "RedHat.hclcdc.janakpuri" group.
To post to this group, send an email to redhathcl...@googlegroups.com.
To unsubscribe from this group, send email to redhathcljanakp...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/redhathcljanakpuri?hl=en-GB.