[Dnsmasq-discuss] Feature request

Albert ARIBAUD albert.aribaud at free.fr
Wed Sep 7 10:07:40 BST 2016

Hi Archi,

Le Wed, 7 Sep 2016 10:03:04 +0200
"Archimede Pitagorico" <archimede.pitagorico at mail.com> a écrit:

> I use a lot the --server and --ipset options. In brief, I want
> certain domains to be dispatched to a special DNS and their IP
> address to be stored in an ipset, so that using iptables and policy
> routing I can dispatch all traffic to these web sites via a special
> interface. it all works well, except that I miss some flexibility in
> defining domain names. for instance I would like
> ipset=/somewebsite.*/specialiface to store the IP addresses for
> somewebsite.com and somewebsite.org in the ipset specialiface. I
> tried to use wildcards, as in the example above, but that t does not
> work. Is there a way to do it? Otherwise, is it possible to add more
> flexibility in specification of domain names (either simple wild
> cards support, or regex support)? thanks a lot Archi

I don't think there is support for wildcard in the domain name for
--ipset, --address or --server directives; at least the manpage does not
indicate there are any.

However, your query is contradictory in that on the one hand youseem to
want to write a generic directive covering any possible TLD, andon the
other hand, you describe a scenario where you only want to catch.org
and .com TLDs.

The latter, I think, is covered with the syntax


More than two domains can be specified, BTW -- I just tried with three
domains using TLD .net, .org and .com, and it works (but then, it would
also work with three --ipset directives each targettting one TLD).

Of course, if you want to catch any FQDN like "*somewebsite.*", that
won't work.


More information about the Dnsmasq-discuss mailing list