I am currently using iptables for my home lab router and would like to add IPv6. I have 2 ISPs.
My first ISP assigns a /128 to the interface and the ability to request /56. ISP1 is connected to eno1.
My second ISP assigns a /128 to the interface and the ability to request /64. ISP2 is connected to eno2.
My LAN is enp2s0f0.
How can I get the clients on my LAN to use a ULA IP range that "maps" to the IPv6 ranges assigned dynamically to eno1 and eno2? I am thinking I can use some form of policy routing at the edge to route traffic through each ISP
I don't have a full example, as "netmap" was only added to ntftables relatively recently. Kernel part, "netfilter: nft_nat: add netmap support", is in Linux 5.8. User tools are similarly new as of last year, src: add netmap support. Based on the commit message, I think snat now supports saddr maps with CIDR prefixes.
This might be simpler and a tiny bit faster without translation. Consider not using NPT. Advertise both prefixes, and hosts have addresses from each. Optionally, generate a ULA prefix for internal static addressing, but don't map it to public prefixes.
This is a lab, maybe try with NPT and without.
I was able to get this to work with iptables.
cat /etc/radvd.conf interface enp2s0f0 {
In my dhcpcd.conf file
And in my iptables script:
I think I did this correctly -- all seems to be working.