[Dnsmasq-discuss] Try next forward servers after NXDOMAIN

Tom Metro tmetro+dnsmasq at gmail.com
Tue Apr 21 06:56:38 BST 2009


Petteri Heinonen wrote:
> - The domain (lets call that ourdomain.com) would need to be same 
> everywhere, so I cannot use for example subdomain.ourdomain.com.

That's a key limitation, of course. If you were able to segregate your 
local dynamic hosts into a subdomain, then you could just use a 
--local=/subdomain.ourdomain.com/ to have those dynamic hosts served by 
Dnsmasq's DHCP cache, or a similar --server= option to direct queries 
for tat subdomain to a local server, like the Bind setup you mentioned.

I thought I remembered an option to map domains matching a pattern to 
another domain - something like 
map=/(*)pattern.ourdomain.com/$1.subdomain.ourdomain.com/ - which would 
have allowed you to map those dynamic hosts transparently to a local 
subdomain, but I misremembered and such an option doesn't exist. 
(Surprisingly :-) ) It only would have helped anyway if you could have 
coerced all the dynamic host names to follow some unique pattern.

The other option I see that might work would require some scripting, but 
avoids hacking the Dnsmasq source. You'd create a custom script called 
via --dhcp-script= whenever a DHCP lease was added or removed (assuming 
that's the source of your dynamic DNS entries), which would then use 
DBus to update Dnsmasq's configuration by adding/removing an 
--address=/dynamichost.ourdomain.com/1.2.3.4/ entry. If I'm interpreting 
the man page correctly, that should short circuit the resolution of 
dynamichost.ourdomain.com while permitting other ourdomain.com hosts to 
be forwarded as usual.

  -Tom

-- 
Tom Metro
Venture Logic, Newton, MA, USA
"Enterprise solutions through open source."
Professional Profile: http://tmetro.venturelogic.com/



More information about the Dnsmasq-discuss mailing list