I do this with a PiHole. You need to use Unique Local Addressing - ULA - (not link local) for your local IPv6 addressing.- Under "Interfaces/Virtual IPs/Settings". assign a ULA to your LAN port, something like FDB1:ABCD:ABCD:ABCD::1/64. (You will want to randomize the address - it should start with FC or FD (I use FD), but the rest of the characters should be randomly selected from 0-9/A-F.)- Under "Services/DHCPv6/LAN" check the "Enable DCHPv6 server" box, and enter the ULA prefix (in this example, FDB1:ABCD:ABCD:ABCD:: ) in the "From" and "To" fields of the "Prefix Delegation Range", and set the "Prefix Delegation Size" to 64- Save- Under "Services/Router Advertisements/LAN", set "Router Advertisements" to Assisted (this is important)- SaveThen your Adguard box should pick up a full ULA IPv6 address (via SLAAC), something that will look like FDB1:ABCD:ABCD:ABCD:xxxx:xxxx:xxxx:xxxx. (To see what address my pihole gets, I log into my pi and issue "ifconfig" - that gives me a list of the addresses my box has, and one of those is the full ULA.)That full ULA is what you use as the DNS server advertised by your router.- Under "Services/DHCPv6/LAN", set the DNS server to the full ULA of your Adguard DNS server, Save- Under "Services/Router Advertisements/LAN", set the DNS server to the full ULA of your Adguard DNS server, Save(Yes, set it in two places. By setting it in Router Advertisements, your computers will receive it as the IPv6 address of the DNS server, and all IPv6 DNS queries will go directly to your Adguard box)When I was getting started with OPNsense it took me a while to figure it out. That first step - assigning a virtual IP to the LAN port - is essential.Good luck![Edit]I forgot to mention, I also use a static IPv4 address for my pihole (set in /etc/dhcpcd.conf on the pihole server). On OPNsense, under Services/DHCPv4/LAN/RANGE, I set a limited range of IPv4 addresses to be assigned to my clients, and then set the pi's static address outside that range. Then I put the pi's static IPv4 address in the Services/DHCPv4/LAN/DNS Server field.This way, I basically have static addresses for both IPv6 and IPv4, and these get sent to my devices either by DHCP (IPv4) or Router Advertisements (IPv6).
lilsense - I haven't looked into using the DUID to create the address. For me, using ULA/SLAAC to create a static address for the pi "just worked", and I stopped looking for other approaches. But yours is an interesting idea I'll take a look at - thanks for suggesting it.
I found the issue on my system that was causing one network segment to get both predefined IPv6 DNS addresses (Cloudflare 2606:4700:4700::1111 / ::1001) and my router's LAN address as a DNS server - on that LAN segment, I had inadvertently left Services/Router Advertisements/Router Advertisements (the first drop down) set to "Disabled". When I set it to "Assisted", the router stopped sending out the LAN address as a DNS server, and only advertised the Cloudflare addresses I entered into the DNS Servers field. So maybe that helps you, opns-sc0?
- Under "Services/Router Advertisements/LAN", set the DNS server to the full ULA of your Adguard DNS server,
Make it a difference, if I activate in "Services/Router Advertisements/LAN" the DNS option "Use the DNS configuration of the DHCPv6 server" instead of enter the IPv6 of the Adguard DNS Server?