Trying to set up a local dns server as to speed up intranet development.
I use bind9 set a sub domain named mydomain.com with /etc/bind/db.mydomain.com.
The problem is that I can correctly resolve address like server.mydomain.com, but the server can not resolve mydomain.com (which without the prefix).
Is there anything I missed?
( My configuration is kind similar as this article http://www.geoffke.be/nieuws/8/ )
Typically sub-domains are a different and seperate forward lookup zone. If you want to make the entire domain searchable you either need a forward lookup zone for each domain (mydomain.com, db.mydomain.com, etc.)
Or simply create a forward lookup zone for mydomain.com and add A records for db.mydomain.com as well. If you need more than just A and CNAME records you will need a different forward lookup zone for each domain.
looking at the tutorial you used, i see the following:
you established A-records for a bunch of subdomains, but none for your TLD. just add a A-record without defining a subdomain like this:
where 192.168.1.100 is the IP you want to point to and you're set.
Did not figure out how to configure under bind9.
But solved this problem using the dnsmasq service.
So, I removed both bind9 and udhcpd service, instead of using dnsmasq as dhcp and dns service provider. In dnsmasq, it will search local /etc/hosts file first where I simply put whatever domain name I want to cheat lan clients.