Server :- shashi.example.com
IP :- 192.168.0.254
Sub :- 255.255.255.0
DNS :- 192.168.0.254
Client :- client.unicom.com
IP :- 192.168.0.2
Sub :- 255.255.255.0
DNS :- 192.168.0.254
1.Required RPM
#bind-libs-9.3.3-10.el5
#bind-chroot-9.3.3-10.el5
#bind-devel-9.3.3-10.el5
#bind-utils-9.3.3-10.el5
#bind-utils-9.3.3-10.el5
#bind-libbind-devel-9.3.3-10.el5
#bind-9.3.3-10.el5
#bind-sdb-9.3.3-10.el5
#caching-nameserver-9.3.3-10.el5
2.Some file check
# vim /etc/hosts
# vim /etc/sysconfig/network
# vim /etc/resolv.conf
3.Configure
# cp -p
/etc/named/caching-nameserver.conf /var/named/chroot/etc/named.conf
4.Soft link
# ln -s
/var/named/chroot/etc/named.conf /etc/named.conf
5.Check
Permission
# ll -ld /etc/named.conf
root named named.conf
6.Create
named.conf
#vim /etc/named.conf
listen-on Port 53 { 127.0.0.1; Server
IP; } ;
allow-query { localhost; any; } ;
allow-query-cache { localhost; any; } ;
match-clients { localhost; any; } ;
match-destinations { localhost; any; }
;
recursion
yes;
zone “example.com” {
type master;
file “example.com.zone”;
};
zone “0.168.192.in-addr.arpa” {
type master;
file “rev-example.com.zone”;
};
7.Test named.conf
# named-checkconf
cd /var/named/chroot/var/named/
# cp -p localdomain.zone
example.com.zone
# vim example.com.zone
# vim example.com.zone
$TTL 86400
@ SOA example.com. root (
42
; serial (d.
adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS
shashi.example.com.
shashi IN A 192.168.0.254
client IN A 192.168.0.2
# cd /var/named/chroot/var/named/
# cp -p named.local
rev-example.com.zone
# vim rev-example.com.zone
$TTL 86400
@ IN SOA example.com.
root.shashi.example.com. (
42
; serial (d.
adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS
shashi.example.com
254 IN PTR shashi.
2 IN PTR client.
-->
# service named start
# service named restart
# chkconfig named on
12.check
DNS
# nslookup
# dig server.example.com
No comments:
Post a Comment