[Dnsmasq-discuss] Address configuration with wildcard

Albert ARIBAUD albert.aribaud at free.fr
Sun Nov 27 09:14:33 GMT 2016


Hi Joachim,

Le Sat, 26 Nov 2016 15:01:47 +0100
Joachim Zobel <jz-2014 at heute-morgen.de> a écrit:

> Hi.
> 
> Is there a way to have address configuration entries with wildcards.
> 
> I tried
> 
> address=/alt#-mtalk.google.com/127.0.0.1
> 
> but it did not work with e.g. alt8-mtalk.google.com

From

	$ man dnsmasq

and looking for '--address' (and then for '--server'):

1. domain specifications in --address are the same as domain
   specifications in --server except for the addition of a '#' domain
   specification meaning "any domain" (rather than "any part of a
   domain" as you seemed to be assuming).

2. domain specifications in --server only allow domain names or the
   empty string '//' which means "unqualified domain names only".

So no, you can't have wildcards in --address domain names.

You do however have implicit "left side wildcards", as a domain spec of
"thisorthis.net" will match any domain /ending/ in "thisorthat.net", if
you can work with that.

The only way to get the behaviour you are looking for in dnsmasq would
be to modify the search_servers() function in src/forward.c -- without
of course introducing any bug or impeding efficiency especially under
high loads.

> Sincerely,
> 
> Joachim

Amicalement,
-- 
Albert.



More information about the Dnsmasq-discuss mailing list