How to get IPv6 with custom DNS

Started by gmanca, September 03, 2026, 04:32:39 PM

Previous topic - Next topic
September 03, 2026, 04:32:39 PM Last Edit: Today at 07:44:28 PM by gmanca
Update: please use IsaacFL's details below as they are correct and better.

******
Original post with some comments
After some trial and error I got it to work and wanted to share here as various pieces online had parts but not together. Some searches even suggested to disable IPv6.

I am using a 3rd party DNS provider and my issue was that the IPv6 DNS was coming from ISP and taking over. IPv4 was being respected but not IPv6.
System:Settings:General already had "Allow DNS server list to be overridden by DHCP/PPP on WAN" unchecked.

I am using Spectrum so here are the settings that worked for me.

WAN interface:
IPv6 Configuration Type: DHCPv6
Prefix delegation size: 56
Request prefix only: checked
Request DNS configuration: checked (unchecking this seems to stop the ISP from providing an IPv6 altogether)
Send prefix hint: checked

LAN interface
Track Interface (legacy) - obsolete option
Parent interface: WAN int name
Assign Prefix ID: using VLAN ID in hex
Reserved prefix range: 1 (beats my understanding)
Allow manual adjustment of DHCPv6 and Router Advertisements: checked

Services: Router Advertisements
Added an entry for LAN interface
Mode: Stateless
Recursive DNS Servers: IPV6 DNS servers
- Use the better option from IsaacFL and add also the Unbound settings to make use of TLS.

Add additional advertisements for interfaces that need it. The above was done on OPNsense 26.7.3_8.

I am not sure what you mean by using Custom DNS, but wouldn't that be better done via unbound?

I also use Spectrum and never had any problems using any upstream DNS I wanted, by using Unbound.

WAN interface:
IPv6 Configuration Type: DHCPv6
Prefix delegation size: 56
Request prefix only: can be checked or not. it provides a unique ipv6 to the WAN interface
Request DNS configuration: I do not check this.
Send prefix hint: checked

LAN interface
Use Identity Association (Track interface is obsolete)
Parent interface: WAN int name
Assign Prefix ID: using VLAN ID in hex
Reserved prefix range: 1
Allow manual adjustment of DHCPv6 and Router Advertisements is no longer there for Identity Association

Services: Router Advertisements
Added an entry for LAN interface
Mode: Unmanaged should be used for Spectrum, otherwise you will have to setup dhcpv6 which isn't recommended for dynamic assigned prefixes
Recursive DNS Servers: Leave blank so it will get from Router

on unbound, under DNS forwarding, set to your 3rd party dns servers, you can use DNS over TLS instead if your 3rd party dns supports it and most do.

With this setup, the network devices will be assigned the router as the local DNS, and your router will then forward to the 3rd party DNS




Thank you!

Yes, I was trying to use Unbound and there is a chance that might worked when I assumed it was ISP DNS. But when I tried Identity Association it did not work. It very well might have been user error like me not saving/reloading interface.

I appreciated the details your provided and that helped me getting DoT working as well. It seems the adage of "best way to find the correct answer is not to ask a question but to post the wrong answer" is true :)

Cheers!