[Dnsmasq-discuss] Feature Request(s)
Simon Kelley
simon at thekelleys.org.uk
Wed Mar 14 20:07:09 GMT 2012
On 09/03/12 19:05, Rob Zwissler wrote:
> Hi Simon - I'm a big fan of DNSMasq, it's great software, thanks all for
> your hard work. I had three requests/questions I just wanted to throw out
> there that would come in handy for simplifying configuration in what I
> think would be an intuitive way. For the most part, this is related to
> consolidating DNSMasq implementations into a single config file and
> extending cmd line syntax to reduce reliance on external files. I really
> like the self contained simple nature of DNSMasq and I won't be happy until
> it's as powerful and cryptic as Perl ;)
>
> 1) address=/domain/ip works great as described, but *.domain and *.*.domain
> (etc...) also resolv based on this syntax. Syntax like address=/.domain/ip
> that would prevent *.domain from resolving, or address=/..domain/ip would
> prevent *.*.domain but allow *.domain, something in that vain, would come
> in handy. That way, single A records could be overridden with
> address=/.host/ip so I could keep everything in a single dnsmasq.conf file
> without maintaining a separate addn-hosts file. Seems like this could
> extend functionality in a very intuitive, backwards-compatible way without
> adding much messiness to config or documentation.
That's a bit of a minefield: address=/.domain/ and address=/domain/ are
equivalent, the former being accepted for backwards-compatibility
reasons. There exists a patch which allows full regexps, which takes the
line of reasoning to the limit. It's never been included because I thing
trying to encode policy on names is wrong, it's too easy end up with the
wrong results if you make statement about anything other than a domain.
>
> 2) Any reason why an /etc/hosts syntax line can't be put in a dnsmasq.conf
> file? As far as I can tell it wouldn't break the dnsmasq syntax, and it
> would allow for consolidating files in a very intuitive, minimalist way.
>
/etc/hosts syntax would be difficult to translate into equivalent
command line options, for consistency, something like
--a-record = <name>,<address>
--aaaa-record = <name>, <address>
and
--host-record = <name>, <address>
which does a both forward and backwards would be possible, I've
considered this before, but most people seem to like to split off such
data into a separate /etc/hosts or another hosts-like file.
> 3) If #1 & #2 aren't feasible, how about something like a=host,ip that
> would allow for an A/PTR pair in more traditional dnsmasq.conf style
> syntax, to reduce the need for an addn-hosts file.
See above.
>
> 4) How come cname= only works for local hosts? Would that be difficult to
> implement so you could create CNAMEs for A records hosted on upstream
> servers?
>
It's a real architectural limitation: the data in a reply has to come
from only local information, or only upstream information, mixing the
two isn't possible. Stub resolvers require both bits of information in
one reply.
Cheers,
Simon.
More information about the Dnsmasq-discuss
mailing list