On Sun, Dec 18, 2022 at 11:10:21AM -0500, Jonathan Stafford wrote: > > On Sun, Dec 18, 2022 at 10:36 AM Michael Smith <mich...@kmaclub.com> wrote: > > > On 12/18/22 06:59, Jonathan Stafford wrote: > > > > > prequel, completely made up: > > > > > > > > LAN is 192.168.6.0/24 > > > > Dnsmasq is at 192.168.6.10 > > > > DHCP range is at 192.168.6.100 - 192.168.6.150 > > > > > > --server provides a way to change upstream resolvers based on the domain > > > being queried. Is there a way to make the same sort of change based on > > > the > > > client doing the querying? For example, I'd like the IP address range I > > > use for my kids' devices to use 1.1.1.3. > > > > You can achieve this using tags: > > > > # Define DNS servers > > dhcp-option=option:dns-server,1.1.1.1 > > dhcp-option=tag:kidsdevices,option:dns-server,1.1.1.3 > > > > > > dhcp-host=0c:51:01:95:d3:36,set:kidsdevices # Ipad > > dhcp-host=58:41:4E:CD:D2:0A,set:kidsdevices # Iphone > > > Thanks, Michael. That will work to get them using that server, but it's > totally bypassing dnsmasq which means my local entries from /etc/hosts > don't resolve. I'd like both things to work to be difficult :)
Something more difficult as making reading in the discussion order possible: * Make dnsmasq bind to 127.0.0.1 and 192.168.6.10 only * Add an IP alias 192.168.6.17 to the dnsmasq server * Create an second dnsmasq.conf * bind only to 192.168.6.17 * upstream DNS 192.168.6.10 In the main dnsmasq.conf # Define DNS servers dhcp-option=option:dns-server,192.168.6.10 dhcp-option=tag:kidsdevices,option:dns-server,192.168.6.17 dhcp-host=0c:51:01:95:d3:36,set:kidsdevices # Ipad dhcp-host=58:41:4E:CD:D2:0A,set:kidsdevices # Iphone No tested, so test it yourself. Karma bonus points for reporting back with reply below the relevant text. Groeten Geert Stappers -- Silence is hard to parse _______________________________________________ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss