<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">Hi Petr,</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">I left out that bit of the config as it
      seemed to be matching OK - the IPv4 DHCP option is set as
      expected.</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">dhcp-host=28:24:FF:FF:25:0D,set:adblock,tv<br>
      dhcp-host=04:33:C2:E4:3D:F6,set:adblock,wombat<br>
      dhcp-option=tag:adblock,6,192.168.42.18<br>
dhcp-option=tag:adblock,option6:dns-server,[fd5d:61f5:a84a:42::18],[2403:5800:3100:142::18]<br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">Even when I set the option for the
      whole network I did not see the expected results in the clients
      especially Android.<br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">dhcp-option=lan,option6:dns-server,[fd5d:61f5:a84a:42::18]<br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">I will try the logging and check some
      packet captures tomorrow.</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">Is there some way other than DHCPv6
      that a client can learn its DNS servers?<br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">Thanks,</div>
    <div class="moz-cite-prefix">Hamish<br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">On 25/3/21 9:31 pm, Petr Menšík wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:4de255fd-025a-5a3b-3470-0a50566b8aaa@redhat.com">
      <pre class="moz-quote-pre" wrap="">Hi Hamish,

I don't see any set:adblock on any host. How are selected hosts, which
should receive adblock server?

--log-dhcp might help to log also tags obtained for each requests. It
should help you checking selected hosts got assigned adblock tag to
whatever rule you have used. And then just set common options for the tag.

On 3/25/21 9:50 AM, Hamish Moffatt wrote:
</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">I'm attempting to override the DNS server for a few hosts on both IPv4
and IPv6. I've tagged the hosts and applied dhcp-option to that tag and
it's working correctly for IPv4, but I'm not having much luck with IPv6.

I'll admit right now that I don't fully understand the use of DHCPv6 and
how DNS servers are discovered, so it might be that this is just not
possible, at least for all types of clients.

My dnsmasq is at ::1, and I want to use the DNS server at ::18 on the
same prefix. What I have is:

dhcp-option=tag:adblock,6,192.168.42.18
dhcp-option=tag:adblock,option6:dns-server,[<MY ULA>::18],[<MY GLA>::18]

dhcp-range=set:lan,192.168.42.20,192.168.42.239,255.255.255.0,12h
ra-param=br-lan,0,7200
dhcp-range=set:lan,::1000,::ffff,constructor:br-lan,slaac,ra-names,12h
dhcp-option=lan,option6:dns-server,[::]

enable-ra
quiet-ra


What I see is that Android just has the <MY GLA>::1 address as its DNS
server. A Linux client using NetworkManager has <MY GLA>::1 as well as
the two override servers. Even when I set <MY GLA>::18 as the server in
the dhcp-option clause for the whole network, the devices still learned
the <MY GLA>::1 address.

If I remove the dhcp-option clause for the whole network then Android
shows it's using the link local address for ::1 instead.

How is Android always learning of the dnsmasq server itself as the DNS
server, and can I fix it?



Thanks

Hamish


_______________________________________________
Dnsmasq-discuss mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk">Dnsmasq-discuss@lists.thekelleys.org.uk</a>
<a class="moz-txt-link-freetext" href="https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss">https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss</a>

</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Dnsmasq-discuss mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk">Dnsmasq-discuss@lists.thekelleys.org.uk</a>
<a class="moz-txt-link-freetext" href="https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss">https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss</a>
</pre>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>