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.

I'm running dhcp-4.0.2 server and bind-9.6.1-P3.

When a new Mac OSX DHCP client with the name "harry" connects to the network, the DHCP server gives it a lease, and adds appropriate A & PTR records via DDNS. This works fine; harry.my.domain points to (e.g.) 192.168.1.3, the Mac client knows that its name is harry.my.domain, 192.168.1.3 points back to harry.my.domain, and all that is great.

Now I want *.harry.my.domain to resolve to 192.168.1.3, and I don't want to have to go in and add wildcard records into zone files. I want the Mac to connect to the network, and have the hostname and wildcard subdomain resolve to the IP address it's been given.

Is there a way to do this?

Thanks!

share|improve this question

2 Answers 2

It's non-trivial.

You'll need to disable the built-in DDNS stuff and reimplement dynamic DNS on your own, using an "on commit {}" event handler. The "REFERENCE: EVENTS" section of the dhcpd.conf(5) man page points users at a string on line 72 of the source code (server/dhcpd.c) which contains one such handler. It seems to indicate that only one handler for each event type can exist.

Unfortunately the handler there is out-of-date and doesn't use RFC-compliant updating, so you'll have to fix that as well. That said, it may be as simple as replacing the ns-update() function calls with the newer ddns-update() calls documented in dhcp-eval(5).

If you do get it working, could you post the event handler you end up using with it?

share|improve this answer

Add (only once) the following record to your BIND zone file:

*.harry.my.domain. CNAME harry.my.domain.
share|improve this answer
    
Hmm, not sure why I've seen this question in the list of "recently active" :) –  Sandman4 Apr 5 '12 at 5:47

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.