[Dnsmasq-discuss] Wildcard config question

Jose Romero jose.romero at core-developers.com
Sun Jan 17 22:31:20 UTC 2021


Hej guys, I have a question. I use dnsmasq on my router home with openwrt
(version 2.80). Recently Im doing some labbing home to install kubernetes
and found I need a wildcard dns in the form of:
*.apps.aaa.mylabb.lan
I googled a bit and I found this can be configured on dnsmasq as:
address=/apps.aaa.mylabb.lan/100.100.100.100
I add this line to my dnsmasq.conf file but dnsmasq crashes... all the docs
i found are atleast a couple of years old and I wonder if the way to add
wildcards dns has changed... since on the documentation does not mention
specifically nothing about the wildcard:
A, --address=/<domain>[/<domain>...]/[<ipaddr>]
    Specify an IP address to return for any host in the given domains.
Queries in the domains are never forwarded and always replied to with the
specified IP address which may be IPv4 or IPv6. To give both IPv4 and IPv6
addresses for a domain, use repeated --address flags. To include multiple
IP addresses for a single query, use --addn-hosts=<path> instead. Note that
/etc/hosts and DHCP leases override this for individual names. A common use
of this is to redirect the entire doubleclick.net domain to some friendly
local web server to avoid banner ads. The domain specification works in the
same was as for --server, with the additional facility that /#/ matches any
domain. Thus --address=/#/1.2.3.4 will always return 1.2.3.4 for any query
not answered from /etc/hosts or DHCP and not sent to an upstream nameserver
by a more specific --server directive. As for --server, one or more domains
with no address returns a no-such-domain answer, so --address=/example.com/ is
equivalent to --server=/example.com/ and returns NXDOMAIN for example.com and
all its subdomains. An address specified as '#' translates to the NULL
address of 0.0.0.0 and its IPv6 equivalent of :: so
--address=/example.com/# will
return NULL addresses for example.com and its subdomains. This is partly
syntactic sugar for --address=/example.com/0.0.0.0 and --address=/
example.com/:: but is also more efficient than including both as separate
configuration lines. Note that NULL addresses normally work in the same way
as localhost, so beware that clients looking up these names are likely to
end up talking to themselves.

I just wonder if someone can enlight me about how is the proper way of
having this configured. perhaps in the case of openwrt throw luci or uci
interface instead of touching the base files...

Regards
/Jose
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20210117/92edccd3/attachment.htm>


More information about the Dnsmasq-discuss mailing list