How to get IPv6 with custom DNS

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

Previous topic - Next topic
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)
 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

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