[Dnsmasq-discuss] Subdomain mapping

Iassen ih.ad at databrokers.net
Fri Apr 10 15:13:10 BST 2015


I would like to "map external host names into my domain address space".

I want to be able to map (change on the fly) the DNS query issued by
the client based on a set of mapping rules or based on a list of
individual mappings.

For example if I define the following HOST mappings
HOST1.delegated1.my.example.com -> HOST1.domain1.com
HOST2.delegated2.my.example.com -> HOST2.domain2.com
HOST3.delegated2.my.example.com -> HOST3.domain2.com

Or the following mapping rules delegated1.my.example.com -> domain1.com
delegated2.my.example.com -> domain2.com

what I would want to happen is for the DNS client to ask: 'resolve
HOST1.delegated1.my.example.com' and based on the rules that are set my
DNS server to actually query an upstream DNS server to find out what is
the actual IP for HOST1.domain1.com and return the result to the client
(with TTL and all).

Additionally if the response is a CNAME I have to resolve it "locally"
and only return the final result (ip or list of ips) to the client. I
should not be returning the CNAME, which would result in another DNS
query being issued.

Any ideas on how to achieve this? Is there some way to do something like
this with DNSMasq or any other DNS server?

I might be wrong, but it seems to me this is a sligthly different case
of adding a host to /etc/host. The only difference is I do not want to
add and entry like 127.0.0.1 HOST1.delegated1.my.example.com but rather
an entry like HOST1.delegated1.my.example.com LNAME HOST1.domain1.com

where LNAME is something like CNAME, but has to be resolved entirely by
me (this DNS server) by quering upstream for the resolution for
HOST1.domain1.com

Any input/ideas are welcome!

Thanks.

--
Iassen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20150410/a2b0595e/attachment.html>


More information about the Dnsmasq-discuss mailing list