Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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/ )

share|improve this question
add comment

3 Answers

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.

share|improve this answer
add comment

looking at the tutorial you used, i see the following:

; IP addresses of local hosts (replace the lines with your own hosts): 
router             IN     A     192.168.1.1 
ns1                IN     A     192.168.1.2 
www                IN     A     192.168.1.3 
mediacenter        IN     A     192.168.1.4 
laptop1            IN     A     192.168.1.5 
workstation1       IN     A     192.168.1.6

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:

; IP addresses of local hosts (replace the lines with your own hosts): 
                   IN     A     192.168.1.100
router             IN     A     192.168.1.1 
ns1                IN     A     192.168.1.2 
www                IN     A     192.168.1.3 
mediacenter        IN     A     192.168.1.4 
laptop1            IN     A     192.168.1.5 
workstation1       IN     A     192.168.1.6

where 192.168.1.100 is the IP you want to point to and you're set.

share|improve this answer
    
Tried, but seems does not work. –  arsane Aug 7 '12 at 2:14
    
it's best you'd post your zone file, else it's just guesswork for me –  funny_ha_ha Aug 7 '12 at 11:10
add comment
up vote 0 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.