I have installed three virtual machines (RHEL 6) on virtualbox, and attached a bridged mode network to all machines
i have to use my first machine to be a DNS and the second and third machine should get their ip from the DNS (i dont need DHCP). is it possible?
i have installed bind in my first machine and added the following in named.conf
options {
listen-on port 53 { 127.0.0.1; 192.168.0.254; };
listen-on-v6 port 53 { ::1;};
directory "/var/named";
dump-file "/var/named/data/cache_dumb.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { localhost; };
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
bindkeys-file "/etc/named.iscdlv.key";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
include "/etc/named.rfc1912.zone";
zone "example.com" IN {
type master;
file "example.com.zone";
allow-update { none; };
};
i have added following to the /var/named/example.com.zone
$ORIGIN example.com.
$TTL 1D
@ IN SOA instructor.example.com. root.example.com. (
201408181847 ; serial number
6H ;refersh after 6 hour
1H ;retry after 1 hour
1W ;expire after 1 week
1D) ; minimum TTL of 1 day
;
;
IN NS instructor.example.com.
IN NS desktop1.example.com.
IN NS desktop2.example.com.
instructor IN A 192.168.0.254
desktop1 IN A 192.168.0.1
desktop2 IN A 192.168.0.2
;
;
@ IN MX 10 mail.example.com.
mail IN A 192.168.0.253
;
;
after that i checked using named-checkconf and no error were returned then i started named service
service named start
chkconfig named on
after that i configured my ip in device configuration as
static IP 192.168.0.254
Netmask 255.255.255.0
Default gateway 192.168.0.254
primary DNS 192.168.0.254
and DNS configuration as
hostname istructor.example.com
primary DNS 192.168.0.254
DNS search path example.com
and restarted the network i could dig all hosts from this machine
then i logged on to second machine (first machine still running) and set ip in device configuration as
static IP 192.168.0.1
Netmask 255.255.255.0
Default gateway 192.168.0.254
primary DNS 192.168.0.254
and DNS configuration as
hostname desktop1.example.com
primary DNS 192.168.0.254
DNS search path example.com
and restarted network now when i dig desktop1.example.com i got the error
; <<>> DiG 9.7.3-P3-RedHat-9.7.3-8.P3.e16 <<>> desktop1.example.com
;; global options: +cmd
;; connection timed out; no servers could be reached
what could be the problem...
please help thanks in advance