[Dnsmasq-discuss] wildcard subdomains for a DHCP-assigned host

Paul Chambers dnsmasq at lists.bod.org
Thu Aug 5 04:02:07 BST 2010


  This may be a dumb question, but I'm no wiser after skimming the man 
page and experimenting a little...

I have a development box I'm using to develop some virtual host stuff. 
I'd like to set up a wildcard subdomain for it. Essentially 
<anything>.dev.foo.bar would resolve to dev.foo.bar's IP address 
(assigned by DHCP). Its IP address does move on occasion, just often 
enough to be irritating/fragile to use an IP directly.

For now, I've worked around it by adding 'address=/dev.foo.bar/<current 
IP addr>' to the config, but that's fragile and seems like a bad idea. I 
could give the box a static IP I suppose, but I much prefer keeping the 
number of static assignments to a minimum. Plus it's a laptop, so I'd 
keep it configured for DHCP and set up a static DHCP assignment based on 
MAC address. Somehow none of this feels very satisfying, just workarounds.

Is there a better way I've missed? If not, is there a reason dnsmasq 
doesn't do this? would it be hard to add? (perhaps support wildcards for 
cname?)

-- Paul



More information about the Dnsmasq-discuss mailing list