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.

my bind config

carrie     IN A     192.253.253.4
*.carrie   IN A     192.253.253.6
*.test.carrie IN A  192.253.253.7

execute

nslookup  carrie 
Address: 192.253.253.4

nslookup a.test.carrie
Address: 192.253.253.7

but when I execute nslookup test.carrie

*** Can't find test.carrie: No answer
share|improve this question
    
Is there anything useful in the nameserver logs? –  Flup Jun 26 '13 at 8:22

1 Answer 1

up vote 10 down vote accepted

The wildcard is working fine, which is why a.test.carrie resolves. Your issue is that test.carrie doesn't resolve.

The reason is simply that you haven't got a record for test.carrie.

*.test.carrie matches immediate subdomains of test.carrie, but matches neither test.carrie itself, nor any subdomains of subdomains of test.carrie.

Add another record without the wildcard.

share|improve this answer
1  
why test.carrie dosen`t match wildchard *.carrie –  leo Jun 26 '13 at 8:30
1  
@leo I'm pretty sure it's because *.test.carrie partially defines test.carrie. Does test2.carrie resolve? If so, try adding *.test2.carrie and see if it breaks. Remember to allow time for your DNS cache to expire for accurate testing. –  Dan Jun 26 '13 at 8:33
1  
nslookup test2.carrie Address: 192.253.253.6 after add *.test2.carrie IN A 192.253.253.11 execute nslookup test2.carrie *** Can't find test2.carrie: No answer –  leo Jun 26 '13 at 8:37
3  
@leo As I thought, there's your answer. Once you add a wildcarded subdomain, BIND will no longer match that subdomain with the wildcard. This is almost certainly expected behaviour –  Dan Jun 26 '13 at 8:42
2  
@Dan Your wording there in the comment is a little off but you're correct. Wildcards match beneath the scope of a dot. –  Andrew B Jun 26 '13 at 17:21

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.