[Dnsmasq-discuss] Wildcard config question

Geert Stappers stappers at stappers.nl
Sun Jan 17 23:34:59 UTC 2021


On Sun, Jan 17, 2021 at 11:31:20PM +0100, Jose Romero wrote:
> 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/10.100.100.100

The websearch I did got me
 address=/.apps.aaa.mylabb.lan/10.100.100.100

note the dot


> I add this line to my dnsmasq.conf file but dnsmasq crashes...

'crash' or "does not work as wanted"?


> 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.

Please report back.


> perhaps in the case of openwrt throw luci or uci
> interface instead of touching the base files...


Regards
Geert Stappers
-- 
Silence is hard to parse



More information about the Dnsmasq-discuss mailing list