So how can I achieve the same behavior as "server=/#/1.1.1.1" from dnsmasq 2.85?
On Tue, 2021-11-09 at 10:33 +0100, Matus UHLAR - fantomas via Dnsmasq- discuss wrote: > On 09.11.21 17:02, Jerry Xiao wrote: > > With dnsmasq 2.85 I was able to do the following: > > 1. set upstream servers (lets say 192.168.1.1) via dbus from the > > dhcp > > client, in my case it was networkmanager. > > 2. add the following config (dnsmasq 2.85): > > server=/google.com/# > > server=/#/1.1.1.1 > > > > So that only google.com and its subdomains are forwarded to the > > upstream server (192.168.1.1) while requests for any other domains > > went > > ahead to 1.1.1.1. > > > However with the recent update of dnsmasq 2.86 I noticed that the > > same > > config above would not work. It seems that the right syntax for > > "server=/#/1.1.1.1" has become "server=//1.1.1.1". This isn't the > > biggest problem though. > > > > with this new config (dnsmasq 2.86): > > server=/google.com/# > > server=//1.1.1.1 > > > > Now every single domain (including google.com) is forwarded to the > > upstream server (192.168.1.1) set via the dbus api instead of > > 1.1.1.1, > > that's because the: > > server=/google.com/# > > means to send the "google.com" requests to default upstream server: > > The special server address '#' means, "use the standard servers", > so > --server=/google.com/1.2.3.4 --server=/www.google.com/# will send > queries for *.google.com to 1.2.3.4, except *www.google.com which > will > be forwarded as usual. > > while the: > > server=//1.1.1.1 > > means to send UNQUALIFIED hosts to 1.1.1.1 > > > > which is an unexpected behavior change from the previous version. > > Setting the upstream server (192.168.1.1) with this config line > > "server=192.168.1.1" without dbus works, though. > > > > Is there something wrong with the new upstream server selection > > logic? > > > _______________________________________________ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss