<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 12/18/22 09:10, Jonathan Stafford
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAC30ZsyD=Ewbg7kC_TBRPnqjUjne-Kyw0h5h1+s1ZeTHyb40Yw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">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 :)</div>
    </blockquote>
    <p><br>
    </p>
    <p>Hi Jonathan,</p>
    <p><br>
    </p>
    <p>Sorry, I didn't respond earlier, but here is what I do in more
      detail.</p>
    <p><br>
    </p>
    <p>I run 2 instances of pihole (DNSmasq) on docker.   Each run on
      their own IP address (macvlan) separate from the docker host.  
      Their IP addresses are .2 and .3.</p>
    <p><br>
    </p>
    <p>The .2 host is primary and forwards upstream to 1.1.1.1.   This
      container also holds all the hosts file info and handles
      DHCP+dynamic host DNS resolution.<br>
    </p>
    <p>The .3 host is secondary and handles only DNS requests for the
      kids.   This forwards upstream to 1.1.1.3.    If  a DNS request
      comes in for local domain info, it simply forwards those requests
      to .2 like this:</p>
    <p><span style="font-family:monospace"><span
          style="color:#000000;background-color:#ffffff;">server=/mydomain.com/192.168.101.2</span><br>
        server=/101.168.192.in-addr.arpa/192.168.101.2</span></p>
    <p><span style="font-family:monospace"><br>
      </span></p>
    <p><span style="font-family:monospace">Combine with the tagging and
        now you can point any client to either upstream DNS:</span></p>
    <p><span style="font-family:monospace"><span
          style="color:#000000;background-color:#ffffff;"># Define DNS
          servers </span><br>
        dhcp-option=option:dns-server,192.168.101.2<br>
      </span><span style="font-family:monospace"><span
          style="color:#000000;background-color:#ffffff;">dhcp-option=tag:kidsdevices,option:dns-server,192.168.101.3</span><br>
      </span></p>
    <p><span style="font-family:monospace"><span
          style="color:#000000;background-color:#ffffff;">dhcp-host=0c:51:01:95:d3:36,set:kidsdevices
            # Ipad </span><br>
        dhcp-host=58:41:4E:CD:D2:0A,set:kidsdevices   # Iphone<br>
      </span></p>
    <p><span style="font-family:monospace"><br>
      </span></p>
    <p><span style="font-family:monospace">While I did this with Pihole,
        you can easily do this with DNSmasq only.    This is also
        similar to what Geert was suggesting.</span></p>
    <p><span style="font-family:monospace"><br>
      </span></p>
    <p><span style="font-family:monospace">Michael</span></p>
    <p><span style="font-family:monospace"><br>
      </span></p>
    <p><span style="font-family:monospace"></span></p>
    <p><span style="font-family:monospace"><br>
      </span></p>
    <p><span style="font-family:monospace">
        <br>
        <br>
      </span></p>
  </body>
</html>