[Dnsmasq-discuss] domain suffix and dns caching
Simon Kelley
simon at thekelleys.org.uk
Thu Oct 4 21:42:35 BST 2007
Louis-Michel Gelinas wrote:
> Hi list,
>
> I am using dnsmasq as a caching dns server, no DHCP.
>
> /etc/resolv.conf contains only :
> nameserver 127.0.0.1
>
> dnsmsq.conf contains:
>
> resolv-file=/etc/resolv.conf.dnsmasq
> listen-address=127.0.0.1
>
> and /etc/resolv.conf.dnsmasq is maintained by helper scripts.
>
> all is good and works fine, apart the domain suffix.
>
> I would like dnsmasq to ADD the suffix to queries without one. This is
> the job of libresolv if I understand correctly, and /etc/resolv.conf is
> only read once ( res_init will have it-reread, but I would like to find
> another solution, hence dnsmasq).
>
> The reason I use dnsmasq is to be able to change dns configs without
> restarting deamons (or using res_init). This works for dns servers, but
> changing the suffix does not.
>
Are you interested in local queries (stuff answered from /etc/hosts) or
stuff passed upstream? There are some facilities to do the opposite of
what you want: adding a suffix to un-decorated names in /etc/hosts, but
not upstream queries.
> Can this be done with stock dnsmasq? Is my idea broken in the first
> place ?
>
I guess it depends on what you are doing: if you can arrange for the
imap sever to be called mail.<domain> everywhere then there are some
advantages, but you'll probably have to restart your mail client anyway.
> If this cannot be done with dnsmasq, is a patch welcome? any
> recommendations as to how to do this?
It's much more difficult than you might at first think, because of the
architecure of dnsmasq. A general solution (a search list of suffices to
check in order) is pretty much impossible. Adding a single suffix to
bare names is possible, but will need some new packet-manipulation code.
Cheers,
Simon.
>
> Thanks
> Louis-Michel Gelinas
>
>
>
>
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>
More information about the Dnsmasq-discuss
mailing list