<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>I would like to "map external host names into my domain address space".<br></div>
<div> </div>
<div>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.<br></div>
<div> </div>
<div>For example if I define the following HOST mappings<br></div>
<div>    HOST1.delegated1.my.example.com    ->  HOST1.domain1.com<br></div>
<div>    HOST2.delegated2.my.example.com    ->  HOST2.domain2.com<br></div>
<div>    HOST3.delegated2.my.example.com     ->  HOST3.domain2.com<br></div>
<div> </div>
<div>Or the following mapping rules<br></div>
<div>    delegated1.my.example.com    ->  domain1.com<br></div>
<div>    delegated2.my.example.com    ->  domain2.com<br></div>
<div> </div>
<div>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).<br></div>
<div> </div>
<div>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. <br></div>
<div> </div>
<div>Any ideas on how to achieve this? Is there some way to do something like this with DNSMasq or any other DNS server?<br></div>
<div> </div>
<div>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<br></div>
<div>  127.0.0.1  HOST1.delegated1.my.example.com<br></div>
<div>but rather an entry like<br></div>
<div>  HOST1.delegated1.my.example.com  LNAME   HOST1.domain1.com<br></div>
<div> </div>
<div>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<br></div>
<div> </div>
<div>Any input/ideas are welcome!<br></div>
<div> </div>
<div>Thanks.<br></div>
<div> </div>
<div>--<br></div>
<div>Iassen<br></div>
<div> </div>
</body>
</html>