[Dnsmasq-discuss] Address configuration with wildcard

Alessandro Bottonelli alessandro at bottonelli.it
Sun Nov 27 16:32:08 GMT 2016


On Sat, 2016-11-26 at 15:01 +0100, Joachim Zobel wrote:
> 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
Hi Joachim, 
I'm not sure if I'm off topic (if so, excuse me). Whether I am or not
depends on what you are trying to achieve with such configuration.
If your purpose is to "filter-out" unwanted connections, there is
another very performing way to achieve this. Right at system level,
without dnsmasq or any other DNS tool. You can filter out unwanted
connections by having those entries in the "/etc/hosts" file (Linux) or
in the "c:\Windows\System32\drivers\etc\hosts" file (Windows). BUT
AGAIN NO WILDCARDS.... :-/ 
Your system (whether Linux or Windows) will first look into the "hosts"
file before (unless otherwise configured, which is uncommon) asking any
resolver. Details at this address: winhelp2002.mvps.org There, you'll
also find a precompiled "hosts" to add to your hosts file. You can add
or remove what you want. Or simply have your own "hosts" file (as of
today alt#-mtalk.google.com entries are not in the provided pre-
compiled hosts).
IT DOES NOT FIX your issue with wildcards,
if there are ten "alt#-mtalk.google.com" in the hosts file you'll have
to define all of them like in:
0.0.0.0    alt0-mtalk.google.com alt1-mtalk.google.com alt3-
mtalk.google.com bla...bla...bla alt9-mtalk.google.com
BUT
it's very performing, the system will resolve to 0.0.0.0 all by itself
in a handful of CPU cycles, no DNS involved at all
AND
I can think of half a dozen ways to script so that "alt#-
mtalk.google.com" as input string can generate the example line above.
(Actually that applies to dnsmasq config as well, but it might
deteriorate perfomances if too many configuration lines are generated
this way)
Again, pardon me if Off Topic (that is, your purpose is not what I
think it to be).
-- 
Alessandro 
NOT connected in any way with mvps.org
Just a##SELECTION_END## fan of the "hosts file" method, and they happen
to be the ones (afaik) who documented it well.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20161127/7ae6e23d/attachment.html>


More information about the Dnsmasq-discuss mailing list