I am setting up experiment virtual network using virtualbox. I configured a BIND DNS server and have some hosts all using ubuntu linux.
I made sure that the forward and reverse configuration files are syntactically correct using:
sudo named-checkzone xyz1.com forward.xyz1.com
resulted in:
zone xyz1.com/IN: loaded serial 5
OK
and:
sudo named-checkzone 56.168.192.in-addr.arpa reverse.xyz1.com
resulted in:
zone 56.168.192.in-addr.arpa/IN: loaded serial 3
OK
I have the following forward.xyz1.com
file:
$TTL 604800
@ IN SOA dns1.xyz1.com. admin.xyz1.com. (
6 ; Serial
604820 ; Refresh
86600 ; Retry
2419600 ; Expire
604600 ) ; Negative Cache TTL
; name servers - NS records
IN NS dns1.xyz1.com.
IN NS dns2.xyz1.com.
; name servers - A records
dns1.xyz1.com. IN A 192.168.56.3
dns2.xyz1.com. IN A 192.168.56.5
; 192.168.56.0/24 - A records
host1.xyz1.com. IN A 192.168.56.7
host2.xyz1.com. IN A 192.168.56.8
I have a virtual machine (host1) with this IP: 192.168.56.7
I have my own Windows machine (actual non virtual). I made sure that I can ping the DNS server that has this IP: 192.168.56.3
and host1 machine that has this IP: 192.168.56.7
I changed my Windows machine network card to use the private DNS server as follows:
I want to test that the private DNS can resolve host names. So I typed in the browser the following host: host1.xyz1.com
I got an error and the browser could not resolve the name. Note that when I put the IP of the host 192.168.56.7
in the browser, I get the page. I am also able to ping it as I said earlier.
There is something wrong in the DNS but I am new to setting up DNS server. Can you point to me what's wrong?
EDIT:
Here is the named.conf.local
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
zone "xyz1.com" {
type master;
file "/etc/bind/forward.xyz1.com";
};
zone "56.168.192.in-addr.arpa"{
type master;
file "/etc/bind/reverse.xyz1.com";
};
Here is the named.conf.options
:
options {
directory "/var/cache/bind";
auth-nxdomain no; # conform to RFC1035
listen-on port 53 { localhost; 192.168.56.0/24; };
recursion yes; # enables resursive queries
allow-query { localhost; 192.168.56.0/24; };
forwarders {
8.8.8.8;
};
};
The server and host both running and I can ping them from my Windows machine: pinging the dns server:
Pinging 192.168.56.3 with 32 bytes of data:
Reply from 192.168.56.3: bytes=32 time<1ms TTL=64
Reply from 192.168.56.3: bytes=32 time<1ms TTL=64
Reply from 192.168.56.3: bytes=32 time<1ms TTL=64
Reply from 192.168.56.3: bytes=32 time<1ms TTL=64
and pinging the host:
Pinging 192.168.56.7 with 32 bytes of data:
Reply from 192.168.56.7: bytes=32 time<1ms TTL=64
Reply from 192.168.56.7: bytes=32 time<1ms TTL=64
Reply from 192.168.56.7: bytes=32 time<1ms TTL=64
Reply from 192.168.56.7: bytes=32 time<1ms TTL=64
However, my network is virtual. Meaning that I am configuring DHCP in the virtualbox Network Host Manager as follows:
My actual machine (the Window machine) network configurations is:
Wireless LAN adapter Wi-Fi:
Connection-specific DNS Suffix . : my-wireless-network
Link-local IPv6 Address . . . . . : xxx
IPv4 Address. . . . . . . . . . . : 10.xx.xxx.xxx
Subnet Mask . . . . . . . . . . . : 255.255.252.0
Default Gateway . . . . . . . . . : 10.xx.xxx.xxx
Ethernet adapter VirtualBox Host-Only Network #3:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::4844:71a7:73f1:69d2%5
IPv4 Address. . . . . . . . . . . : 192.168.56.6
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
Wireless LAN adapter Local Area Connection* 3:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Ethernet adapter Bluetooth Network Connection:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
named
server, how exactly did you configure it – what does thezone{}
block look like?nslookup
in a command prompt on windows. It'll give you more infomation - you may need to forward the ports to allow the DNS to work.