Configuration of BIND server in RHEL5.4 on VMware
Hi,
Happy new year to all (Though it is a little bit late to wish and sorry
for that). Lets jump to problem.(Pls be patient while reading). My
problem is to setup BIND server in RHEL5.4 . I install VMware on a
WindwosXP machine. And I have 5 virtual machine on VMware. I create a
virtual LAN with these 5 machine. I try to configure VMware_machine_1
as the DNS server for other Virtual machines. Here I give WindowsXP and
2 Virtual machine's configuration.
***********************************************************************
Network configuration
WindowsXP(Host machine)
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.61.43
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.61.1
VMware_machine_1:
Here I use two Ethernet card. One for get internet and another for
create virtual LAN.
eth0
Connection type is NAT (Used to share the host's IP
address)
IP 192.168.255.134 (I don't know how it get DHCP)
Subnet mask 255.255.255.0
Default Gateway (I leave it blank)
eth1
Connection type is STATIC (Used to create the LAN and
here I use Ethernet card VMnet2)
IP 192.168.8.1
Subnet mask 255.255.255.0
Default Gateway (Nil)
VMware_machine_2
etho
Connection type is STATIC (Here I use Ethernet card
VMnet2)
IP 192.168.8.2
Subnet Mask 255.255.255.0
Default Gateway (Nil)
***********************************************************************
Here are some more configuration of VMware_machine_1
cat /etc/hosts
#Do not......
#...........fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.8.1 server1.example.com server1
cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=server1.example.com
cat /etc/resolv.conf
search localdomain
nameserver 192.168.8.1
***********************************************************************
I install package bind, bind-chroot and caching-nameserver from my
local repository.
Then I run
chkconfig named on
service named start
cd /var/named/chroot/etc/
cp named.caching-nameserver.conf named.conf
vim named.conf (here I edit and add bellows configuration)
listen-on port 53 { 127.0.0.1; 192.168.8.1; };
allow-query { localhost; 192.168.8.0/24; };
zone "example.com" IN{
type master;
file "example.fz"; (N.B- forward zone file)
allow-update { none; };
};
zone "8.168.192.in-addr.arpa IN{
type master;
file "example.rz"; (N.B- reverse zone file)
allow-update { none; };
};
Then I create two zone file in /var/named/chroot/var/named/
vim /var/named/chroot/var/named/example.fz
$TTL 86400
@ IN SOA server1.example.com root.example.com (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS server1
server1 IN A 192.168.8.1
vim /var/named/chroot/var/named/example.rz
$TTL 86400
@ IN SOA server1.example.com root.example.com (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS server1
server1 IN A 192.168.8.1
I change the group ownership (to named) of the bellows file.
/var/named/chroot/etc/named.conf
/var/named/chroot/var/named/exmaple.fz
/var/named/chroot/var/named/exmaple.rz
After that when I run (service named restart) command the result
displays as bellows.
Stopping named: [ OK ]
Starting named:
Error in named configuration:
/etc/named.conf:42: when using 'view' statements, all zones must be in
views [FAILED]
So what is the problem. If someone fix it for me or help me regarding
this I will be grateful. And thanks in advance.
N.B- Sorry for my poor English writing skill.
Last edited by kinamedebo; 01-09-2010 at 02:45 PM.
|