I have a dedicated server with a big block of IPv6 IPs.
I'd like to be able to use a randomized IPv6 IP within that block and run all outgoing connections through that single selected IP.
I've already accomplished the same thing with IPv4 by using iptables:
iptables -t nat -A POSTROUTING -p tcp -m tcp ! -s XXX.XXX.XXX.XXX -j SNAT --to-source XXX.XXX.XXX.XXX
Since ip6tables doesn't seem to have a NAT table, I started looking for alternatives... One alternative I found is : NATP66 .
If I installed and compiled everything for NATP66 to work I think I could probably use this ip6tables rule:
ip6tables -t nat66 -A POSTROUTING -p tcp -m tcp ! -s IPV6_IP_GOES_HERE -j SNAT66 --to-range IPV6_IP_GOES_HERE
The thing I didn't like about NATP66 is the fact that I have to recompile the kernel in order to make it work (and I really want to stay away from having to do that unless it was my last option).