Mapping local IPv4 and IPv6 to adresses in a /80 routable subnet

This OpenWRT router gets a routable /80 subnet from a mesh VPN software we use to manage networking infrastructure, I'd like to "map" the addresses of some devices that support IPv6 (a couple of managed switches) and others that don't (modem from ISP), so that they can be accessed through the VPN. How can I acomplish this?

Some notes:

  • I'm aware the /80 suffix is far from /64, but that's what I have to work with
  • I don't care about SLAAC in this case, I'd rather have a manual mapping for them
  • The devices being mapped don't need to be able to reliably reach all clients on the VLAN, nor a subset of them (It occurred to me that in the case of IPv6 -> IPv4 fake addresses could be used when establishing a new connection, just a thought)

Thanks for reading.

It sounds like you want to enable NAT for IPv6; as I don't think OpenWrt likes assigning subnets smaller than /64.

https://openwrt.org/docs/guide-user/network/ipv6/ipv6.nat6

1 Like