[Dnsmasq-discuss] Expand-host multiple domains?

wkitty42 at gmail.com wkitty42 at gmail.com
Wed Oct 10 01:29:41 BST 2018


On 10/09/2018 09:57 AM, Jarno Elonen wrote:
> Is it possible to expand hosts file entries against multiple domains with
> Dnsmasq? Or perhaps setup a DNAME-like aliasing of hosts in one domain to
> another domain?
> 
> To clarify, if my "/etc/hosts" contained... 1.2.3.4 host1 4.5.6.7 host2 
> ...and my domains were "old-domain.com" and "new-domain.com", I'd like to
> somehow configure dnsmasq to handle all these queries:
> host1 --> 1.2.3.4
> host2 --> 4.5.6.7
> host1.old-domain.com --> 1.2.3.4
> host2.old-domain.com --> 4.5.6.7
> host1.new-domain.com --> 1.2.3.4
> host2.new-domain.com --> 4.5.6.7

looks like a standard hosts file setup to me... but it could also be done
another way, as well...

eg:
server=/host1.new-domain.com/ip.num.ber.here
server=/host1.old-domain.com/ip.num.ber.here

i think that would work as well as entries in the hosts file for something like
this...

of course, this would only work for those systems looking up on that dnsmasq
instance...


-- 
  NOTE: No off-list assistance is given without prior approval.
        *Please keep mailing list traffic on the list unless*
        *a signed and pre-paid contract is in effect with us.*



More information about the Dnsmasq-discuss mailing list