[Dnsmasq-discuss] --synth-domain enhancement
Andy Hawkins
andy at gently.org.uk
Thu Feb 15 17:12:39 GMT 2018
Hi,
In article <774c6255-31dd-a6f3-d208-11aa41b9c022 at thekelleys.org.uk>,
Simon Kelley<simon at thekelleys.org.uk> wrote:
> It could be done: just requires even more scary string-mangling in
> src/domain.c and inventing a way to configure it.
>
> I prosose something like
>
> --synth-domain=thekelleys.org.uk,192.168.0.0/24,internal-*
>
> where the final * in the prefix generates "counting mode" so that
>
> 192.168.0.0 becomes internal-0,thekelleys.org.uk
>
> A range rather than a subnet is already allowed, so your example becomes
>
>
> --synth-domain=gently.org.uk,192.168.202.50,192.168.202.70,dyn-*
>
>
> Anyone got a better idea?
That sounds good to me. The only thing missing is the 'arithmetic' bit on
the generated host name / IP address.
In your example above, I would want (for example)
192.168.202.50 - dyn-1
192.168.202.51 - dyn-2
etc.
This is possible in bind using the syntax I posted earlier, but isn't (yet)
in dnsmasq.
It's hardly the end of the world if I have to manually enter each one
though, so I wouldn't push for this change too much if it turned out to be
particularly difficult or generate any strong objections.
Andy
More information about the Dnsmasq-discuss
mailing list