Discussion:
[Dnsmasq-discuss] Expand-host multiple domains?
Jarno Elonen
2018-10-09 13:57:52 UTC
Permalink
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

-Jarno
w***@gmail.com
2018-10-10 00:29:41 UTC
Permalink
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
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.*
Loading...