OPNsense Forum

English Forums => General Discussion => Topic started by: russellfolk on June 20, 2025, 12:41:57 AM

Title: Is my understanding of IPv6 completely off?
Post by: russellfolk on June 20, 2025, 12:41:57 AM
I will be posting this to /r/opnsense as well for maximum visibility...

Let me open by saying my goal is to treat IPv6 as "the next IPv4" in that I want to assign host addresses, break VLANs by "subnet", assign cross-VLAN access, etc.

Goals with IPv6


I've tried with the old ISC service off and on to little avail but not that dedicated.  I'm trying now with the new way and I am running into issues with DNSmasq.  I'm beginning to wonder though if maybe I'm working outside the spec.

My Understandings of IPv6 (note: using DNSMasq)


Where do I go from here?

Am I fundamentally misunderstanding IPv6 and its capabilities?  In a world with vastly more security threats than the one IPv4 launched into, I can't see it just being more open and less restrict(ed/able) in general!  Where am I going wrong?

As I figure this out I am more than willing to help update documentation, just point me in the right direction.  Once my kid gets older and I have free time (hahaha good one) I would love to help contribute code, but in the meantime I'll continue to evangelize and work with but maybe I'm just off my rocker on this.... Could Michael W. Lucas write a book on all this already? 😛
Title: Re: Is my understanding of IPv6 completely off?
Post by: meyergru on June 20, 2025, 12:03:39 PM
Your observations are mostly correct, but if you look at how this is all thought out, it makes more sense - and less sense for many setups.

For example: Some devices do not support DHCPv6 at all, therefore they need RA anyway. That is the main reason why I recommend using RA only (https://forum.opnsense.org/index.php?topic=45822.0). The router advertisement daemon would then announce stateless operation, potentially with assisted DNS settings, which some devices can only get via DHCPv6 (they will get IPs and routes via RA, but their DNS server via DHCPv6). Then again, you should better refrain from that, because if you use dual-stack, then the priority of IPv6 and IPv4 DNS servers is not defined and they probably are the same machine anyway, so IPv4 would be sufficient for that (plus, the IPv4 DNS server can also hand out IPv6 addresses).

It get even more complicated, if your IPv6 prefixes are dynamic (depends on your ISP). Even if you could assign static, foreseeable IPv6s via DUIDs, their prefix would change, so it does not work. You would need ULAs for that, just to have internal naming. For externally resolvable names, you will need DynDNS in that case, anyway. So, it is easier to stay with IPv4 in your LAN, have IPv6 access to the outside via GUA, assigned by RA only and if need be, use a reverse proxy to access services in your LAN via an IPv6 -> IPv4 translation. Doing it this way also allows OpnSense itself to take care of the DynDNS, because there will be only the WAN IPv6 being used.

You can even use IPv6 privacy extensions that way. And if you really need it, you can always access clients via IPv6 by their MAC-derived EUI-64, too, because the OpnSense firewall can use partial IPv6 dynamic host aliases.

That way, you do not have to think about DUIDs or anything.

And BTW: VLAN separation works much the same way as with IPv4: you use different prefixes for each VLAN (usually, your ISP assigns you a /56 prefix, so you can have 256 IPv6 subnets).

There is another thread that you should probably read: https://forum.opnsense.org/index.php?topic=47243.0