[DNS] A and AAAA for sub sub domains: fast /easy question (hopefully): give me a confirm/advice, please

Hi everybody,
I need a fast and easy confirm.
Actually I have done

uci add_list dhcp.@dnsmasq[0].address="/home.lan/"
uci commit dhcp
/etc/init.d/dnsmasq restart

to "redirect" all requests for domain *.home.lan to
Now, if I want to redirect the requests of a single subdomain of home.lan, for example nas.home.lan and its related sub sub domains *.nas.home.lan, f.e.:


to another ip, f.e., I can just do:

uci add_list dhcp.@dnsmasq[0].address="/nas.home.lan/"
uci commit dhcp
/etc/init.d/dnsmasq restart


In other words, dns understands that there is a different ip for the more specific subdomain nas.home.lan, even if it has already an entry for home.lan?


ps: the [0] in the dhcp.@dnsmasq[0] to what refer? Should/Might use dhcp.@dnsmasq[1]?


No. You have only one dnsmasq instance running.


You probably want to use selective DNS forwarding.

1 Like

Thanks to both! But now I have a curiosity....
Is it supported also some sort of pattern matching or wildcard? If I just want to route *-test.myDomain.com, I can just use this string in the hostname(s) part? Or this is the forwarding use case?

Wildcards are not supported and the domain name in the address or server options cannot start with a hyphen. In my opinion, what you want to achieve (*-test.myDomain.com) is not possible.


1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.