I would like to use dnsmasq and pihole to create a DHCP server which propagates the DNS server to the clients.
I already did it with IPv4: I disabled the DHCP in the router, setup DHCP in dnsmasq and let it distribute the DNS address. And it works: All devices don't have advertisment.
But I have a big problem: I am using a very bad router (Speedport Smart by Telekom) where DHCPv6 cannot be deactivated! My clients won't listen to dnsmasq, because the DHCPv6 reply of the router comes a few microseconds faster than the answer from my Raspberry... (I checked it with Wireshark) And because devices usually prefer IPv6, I still have advertisment, as long as I don't disable IPv6 ... but this is not possible without a rooted Android.
So my question is: Can I somehow make the clients ignore the DHCP response of my router and force them to automatically use my raspberry's response? (Somehow, give my response a higher priority than the router's?) Or is it at least possible to give the clients an additional list of DNS addresses which has a higher priority?
So the clients would have this DNS list:
2003:xxxx:xxxx.... (<-- DNS address from the DHCP response of my raspberry, with higher priority) fe80::1 (<-- DNS address from the DHCP response of my router)
My current configuration of dnsmasq is:
[11:59]root@ras3:/etc/dnsmasq.d$ cat 99-dhcp.conf enable-ra ra-param=high,60 no-hosts no-resolv dhcp-authoritative ### IPv4 dhcp-option=1,255.255.255.0 dhcp-option=3,192.168.69.1 dhcp-range=192.168.69.200,192.168.69.250,72h dhcp-option=252,"\n" dhcp-option=option:ntp-server,126.96.36.199 dhcp-option=option:dns-server,192.168.69.60 ### IPv6 dhcp-range=::100,::1ff,constructor:eth0 dhcp-option=option6:information-refresh-time,1h dhcp-option=option6:ntp-server,[2610:20:6F15:15::27] dhcp-option=option6:dns-server,[fe80::3da:f98:b225:5e4],[2001:4860:4860::8888],[2001:4860:4860::8844] ## Clients dhcp-host=24:77:03:68:DB:5C,dell_wlan,192.168.69.89 dhcp-host=88:AD:D2:95:F6:D8,galaxy_a5,192.168.69.113 ## DNSSec dnssec trust-anchor=.,19036,8,2,49AAC11D7B6F6446702E54A1607371607A1A41855200FD2CE1CDDE32F24E8FB5 dnssec-check-unsigned